Created
February 24, 2016 08:34
-
-
Save pogin503/784e049b6c63573ba9db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 確認用 | |
emacs --batch --eval "(progn (message (mapconcat 'identity load-path \"\\n\")) (normal-top-level-add-subdirs-to-load-path) (message (mapconcat 'identity load-path \"\\n\")))" | |
# 実行 | |
emacs --batch -l util.el --eval "(add-to-load-path \"elpa\")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; util.el --- util.el -*- lexical-binding: t; coding: utf-8 -*- | |
;;; Commentary: | |
;; This program is free software | |
;;; Code: | |
(defun add-to-load-path (&rest paths) | |
"Add to load path recursively. | |
`PATHS' Directorys you want to read recursively." | |
(let (path) | |
(dolist (path paths paths) | |
(let ((default-directory (expand-file-name (concat user-emacs-directory path)))) | |
(add-to-list 'load-path default-directory) | |
(if (fboundp 'normal-top-level-add-subdirs-to-load-path) | |
(normal-top-level-add-subdirs-to-load-path)))))) | |
(provide 'util) | |
;;; util.el ends here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment