(message "Back to top level.")
(setq command-line-processed t)
+ ;; Look in each dir in load-path for a subdirs.el file. If we
+ ;; find one, load it, which will add the appropriate subdirs of
+ ;; that dir into load-path. This needs to be done before setting
+ ;; the locale environment, because the latter might need to load
+ ;; some support files.
+ ;; Look for a leim-list.el file too. Loading it will register
+ ;; available input methods.
+ (let ((tail load-path)
+ (lispdir (expand-file-name "../lisp" data-directory))
+ ;; For out-of-tree builds, leim-list is generated in the build dir.
+;;; (leimdir (expand-file-name "../leim" doc-directory))
+ dir)
+ (while tail
+ (setq dir (car tail))
+ (let ((default-directory dir))
+ (load (expand-file-name "subdirs.el") t t t))
+ ;; Do not scan standard directories that won't contain a leim-list.el.
+ ;; http://lists.gnu.org/archive/html/emacs-devel/2009-10/msg00502.html
+ (or (string-match (concat "\\`" lispdir) dir)
+ (let ((default-directory dir))
+ (load (expand-file-name "leim-list.el") t t t)))
+ ;; We don't use a dolist loop and we put this "setq-cdr" command at
+ ;; the end, because the subdirs.el files may add elements to the end
+ ;; of load-path and we want to take it into account.
+ (setq tail (cdr tail))))
+
;; Set the default strings to display in mode line for end-of-line
;; formats that aren't native to this platform. This should be
;; done before calling set-locale-environment, as the latter might
;; `user-full-name' is now known; reset its standard-value here.
(put 'user-full-name 'standard-value
(list (default-value 'user-full-name)))
- ;; Look in each dir in load-path for a subdirs.el file.
- ;; If we find one, load it, which will add the appropriate subdirs
- ;; of that dir into load-path,
- ;; Look for a leim-list.el file too. Loading it will register
- ;; available input methods.
- (let ((tail load-path)
- (lispdir (expand-file-name "../lisp" data-directory))
- ;; For out-of-tree builds, leim-list is generated in the build dir.
-;;; (leimdir (expand-file-name "../leim" doc-directory))
- dir)
- (while tail
- (setq dir (car tail))
- (let ((default-directory dir))
- (load (expand-file-name "subdirs.el") t t t))
- ;; Do not scan standard directories that won't contain a leim-list.el.
- ;; http://lists.gnu.org/archive/html/emacs-devel/2009-10/msg00502.html
- (or (string-match (concat "\\`" lispdir) dir)
- (let ((default-directory dir))
- (load (expand-file-name "leim-list.el") t t t)))
- ;; We don't use a dolist loop and we put this "setq-cdr" command at
- ;; the end, because the subdirs.el files may add elements to the end
- ;; of load-path and we want to take it into account.
- (setq tail (cdr tail))))
;; If the PWD environment variable isn't accurate, delete it.
(let ((pwd (getenv "PWD")))
(and (stringp pwd)