emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/startup.el [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/startup.el [emacs-unicode-2]
Date: Thu, 09 Sep 2004 17:25:44 -0400

Index: emacs/lisp/startup.el
diff -c emacs/lisp/startup.el:1.321.2.5 emacs/lisp/startup.el:1.321.2.6
*** emacs/lisp/startup.el:1.321.2.5     Sat Sep  4 09:14:25 2004
--- emacs/lisp/startup.el       Thu Sep  9 09:36:32 2004
***************
*** 1482,1493 ****
            (file-count 0)
            first-file-buffer
            tem
!           ;; The directories listed in --directory/-L options will *appear*
!           ;; at the front of `load-path' in the order they appear on the
!           ;; command-line.  We cannot do this by *placing* them at the front
!           ;; in the order they appear, so we need this variable to hold them,
!           ;; temporarily.
!           extra-load-path
            just-files ;; t if this follows the magic -- option.
            ;; This includes our standard options' long versions
            ;; and long versions of what's on command-switch-alist.
--- 1482,1500 ----
            (file-count 0)
            first-file-buffer
            tem
!           ;; This approach loses for "-batch -L DIR --eval "(require foo)",
!           ;; if foo is intended to be found in DIR.
!           ;;
!           ;; ;; The directories listed in --directory/-L options will *appear*
!           ;; ;; at the front of `load-path' in the order they appear on the
!           ;; ;; command-line.  We cannot do this by *placing* them at the 
front
!           ;; ;; in the order they appear, so we need this variable to hold 
them,
!           ;; ;; temporarily.
!           ;; extra-load-path
!           ;;
!           ;; To DTRT we keep track of the splice point and modify `load-path'
!           ;; straight away upon any --directory/-L option.
!           splice
            just-files ;; t if this follows the magic -- option.
            ;; This includes our standard options' long versions
            ;; and long versions of what's on command-switch-alist.
***************
*** 1556,1570 ****
  
                  ((member argi '("-eval" "-execute"))
                   (eval (read (or argval (pop command-line-args-left)))))
-                 ;; Set the default directory as specified in -L.
  
                  ((member argi '("-L" "-directory"))
!                  (setq tem (or argval (pop command-line-args-left)))
!                  ;; We will reverse `extra-load-path' and prepend it to
!                  ;; `load-path' after all the arguments have been processed.
!                  (push
!                   (expand-file-name (command-line-normalize-file-name tem))
!                   extra-load-path))
  
                  ((member argi '("-l" "-load"))
                   (let* ((file (command-line-normalize-file-name
--- 1563,1577 ----
  
                  ((member argi '("-eval" "-execute"))
                   (eval (read (or argval (pop command-line-args-left)))))
  
                  ((member argi '("-L" "-directory"))
!                  (setq tem (expand-file-name
!                             (command-line-normalize-file-name
!                              (or argval (pop command-line-args-left)))))
!                  (cond (splice (setcdr splice (cons tem (cdr splice)))
!                                (setq splice (cdr splice)))
!                        (t (setq load-path (cons tem load-path)
!                                 splice load-path))))
  
                  ((member argi '("-l" "-load"))
                   (let* ((file (command-line-normalize-file-name
***************
*** 1645,1654 ****
                             (move-to-column (1- column)))
                           (setq column 0))))))))
  
-       ;; See --directory/-L option above.
-       (when extra-load-path
-         (setq load-path (append (nreverse extra-load-path) load-path)))
- 
        ;; If 3 or more files visited, and not all visible,
        ;; show user what they all are.  But leave the last one current.
        (and (> file-count 2)
--- 1652,1657 ----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]