aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-11-05 18:18:00 +0200
committerEli Zaretskii2013-11-05 18:18:00 +0200
commit375761b2435915b7b1d3bf10dbbe39b47d370177 (patch)
tree88cde9626ac2733449a2886eb5f5b899c999e6b9
parent80ff092b478bac8fbda4cec1e7b554a1fc98a647 (diff)
downloademacs-375761b2435915b7b1d3bf10dbbe39b47d370177.tar.gz
emacs-375761b2435915b7b1d3bf10dbbe39b47d370177.zip
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.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/startup.el49
2 files changed, 31 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6b7f169887c..0a7442d435e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-11-05 Eli Zaretskii <eliz@gnu.org>
2
3 * startup.el (normal-top-level): Load the subdirs.el files before
4 setting the locale environment. (Bug#15805)
5
12013-11-05 Stefan Monnier <monnier@iro.umontreal.ca> 62013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * vc/vc-rcs.el (vc-rcs-parse): Make `gather' get e, b, and @-holes 8 * vc/vc-rcs.el (vc-rcs-parse): Make `gather' get e, b, and @-holes
diff --git a/lisp/startup.el b/lisp/startup.el
index 963ee687a3b..2394c73b879 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -490,6 +490,32 @@ It is the default value of the variable `top-level'."
490 (message "Back to top level.") 490 (message "Back to top level.")
491 (setq command-line-processed t) 491 (setq command-line-processed t)
492 492
493 ;; Look in each dir in load-path for a subdirs.el file. If we
494 ;; find one, load it, which will add the appropriate subdirs of
495 ;; that dir into load-path. This needs to be done before setting
496 ;; the locale environment, because the latter might need to load
497 ;; some support files.
498 ;; Look for a leim-list.el file too. Loading it will register
499 ;; available input methods.
500 (let ((tail load-path)
501 (lispdir (expand-file-name "../lisp" data-directory))
502 ;; For out-of-tree builds, leim-list is generated in the build dir.
503;;; (leimdir (expand-file-name "../leim" doc-directory))
504 dir)
505 (while tail
506 (setq dir (car tail))
507 (let ((default-directory dir))
508 (load (expand-file-name "subdirs.el") t t t))
509 ;; Do not scan standard directories that won't contain a leim-list.el.
510 ;; http://lists.gnu.org/archive/html/emacs-devel/2009-10/msg00502.html
511 (or (string-match (concat "\\`" lispdir) dir)
512 (let ((default-directory dir))
513 (load (expand-file-name "leim-list.el") t t t)))
514 ;; We don't use a dolist loop and we put this "setq-cdr" command at
515 ;; the end, because the subdirs.el files may add elements to the end
516 ;; of load-path and we want to take it into account.
517 (setq tail (cdr tail))))
518
493 ;; Set the default strings to display in mode line for end-of-line 519 ;; Set the default strings to display in mode line for end-of-line
494 ;; formats that aren't native to this platform. This should be 520 ;; formats that aren't native to this platform. This should be
495 ;; done before calling set-locale-environment, as the latter might 521 ;; done before calling set-locale-environment, as the latter might
@@ -557,29 +583,6 @@ It is the default value of the variable `top-level'."
557 ;; `user-full-name' is now known; reset its standard-value here. 583 ;; `user-full-name' is now known; reset its standard-value here.
558 (put 'user-full-name 'standard-value 584 (put 'user-full-name 'standard-value
559 (list (default-value 'user-full-name))) 585 (list (default-value 'user-full-name)))
560 ;; Look in each dir in load-path for a subdirs.el file.
561 ;; If we find one, load it, which will add the appropriate subdirs
562 ;; of that dir into load-path,
563 ;; Look for a leim-list.el file too. Loading it will register
564 ;; available input methods.
565 (let ((tail load-path)
566 (lispdir (expand-file-name "../lisp" data-directory))
567 ;; For out-of-tree builds, leim-list is generated in the build dir.
568;;; (leimdir (expand-file-name "../leim" doc-directory))
569 dir)
570 (while tail
571 (setq dir (car tail))
572 (let ((default-directory dir))
573 (load (expand-file-name "subdirs.el") t t t))
574 ;; Do not scan standard directories that won't contain a leim-list.el.
575 ;; http://lists.gnu.org/archive/html/emacs-devel/2009-10/msg00502.html
576 (or (string-match (concat "\\`" lispdir) dir)
577 (let ((default-directory dir))
578 (load (expand-file-name "leim-list.el") t t t)))
579 ;; We don't use a dolist loop and we put this "setq-cdr" command at
580 ;; the end, because the subdirs.el files may add elements to the end
581 ;; of load-path and we want to take it into account.
582 (setq tail (cdr tail))))
583 ;; If the PWD environment variable isn't accurate, delete it. 586 ;; If the PWD environment variable isn't accurate, delete it.
584 (let ((pwd (getenv "PWD"))) 587 (let ((pwd (getenv "PWD")))
585 (and (stringp pwd) 588 (and (stringp pwd)