Commit 375761b2 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix bug #15805 with trying to load Lisp files before load-path is populated.

 lisp/startup.el (normal-top-level): Load the subdirs.el files before
 setting the locale environment.
parent 80ff092b
2013-11-05 Eli Zaretskii <eliz@gnu.org>
* startup.el (normal-top-level): Load the subdirs.el files before
setting the locale environment. (Bug#15805)
2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
* vc/vc-rcs.el (vc-rcs-parse): Make `gather' get e, b, and @-holes
......
......@@ -490,6 +490,32 @@ It is the default value of the variable `top-level'."
(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
......@@ -557,29 +583,6 @@ It is the default value of the variable `top-level'."
;; `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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment