/[emacs]/emacs/lisp/startup.el
ViewVC logotype

Diff of /emacs/lisp/startup.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.321.2.5 by miles, Sat Sep 4 09:14:25 2004 UTC revision 1.321.2.6 by miles, Thu Sep 9 09:36:32 2004 UTC
# Line 1482  normal otherwise." Line 1482  normal otherwise."
1482            (file-count 0)            (file-count 0)
1483            first-file-buffer            first-file-buffer
1484            tem            tem
1485            ;; The directories listed in --directory/-L options will *appear*            ;; This approach loses for "-batch -L DIR --eval "(require foo)",
1486            ;; at the front of `load-path' in the order they appear on the            ;; if foo is intended to be found in DIR.
1487            ;; command-line.  We cannot do this by *placing* them at the front            ;;
1488            ;; in the order they appear, so we need this variable to hold them,            ;; ;; The directories listed in --directory/-L options will *appear*
1489            ;; temporarily.            ;; ;; at the front of `load-path' in the order they appear on the
1490            extra-load-path            ;; ;; command-line.  We cannot do this by *placing* them at the front
1491              ;; ;; in the order they appear, so we need this variable to hold them,
1492              ;; ;; temporarily.
1493              ;; extra-load-path
1494              ;;
1495              ;; To DTRT we keep track of the splice point and modify `load-path'
1496              ;; straight away upon any --directory/-L option.
1497              splice
1498            just-files ;; t if this follows the magic -- option.            just-files ;; t if this follows the magic -- option.
1499            ;; This includes our standard options' long versions            ;; This includes our standard options' long versions
1500            ;; and long versions of what's on command-switch-alist.            ;; and long versions of what's on command-switch-alist.
# Line 1556  normal otherwise." Line 1563  normal otherwise."
1563    
1564                  ((member argi '("-eval" "-execute"))                  ((member argi '("-eval" "-execute"))
1565                   (eval (read (or argval (pop command-line-args-left)))))                   (eval (read (or argval (pop command-line-args-left)))))
                 ;; Set the default directory as specified in -L.  
1566    
1567                  ((member argi '("-L" "-directory"))                  ((member argi '("-L" "-directory"))
1568                   (setq tem (or argval (pop command-line-args-left)))                   (setq tem (expand-file-name
1569                   ;; We will reverse `extra-load-path' and prepend it to                              (command-line-normalize-file-name
1570                   ;; `load-path' after all the arguments have been processed.                               (or argval (pop command-line-args-left)))))
1571                   (push                   (cond (splice (setcdr splice (cons tem (cdr splice)))
1572                    (expand-file-name (command-line-normalize-file-name tem))                                 (setq splice (cdr splice)))
1573                    extra-load-path))                         (t (setq load-path (cons tem load-path)
1574                                    splice load-path))))
1575    
1576                  ((member argi '("-l" "-load"))                  ((member argi '("-l" "-load"))
1577                   (let* ((file (command-line-normalize-file-name                   (let* ((file (command-line-normalize-file-name
# Line 1645  normal otherwise." Line 1652  normal otherwise."
1652                             (move-to-column (1- column)))                             (move-to-column (1- column)))
1653                           (setq column 0))))))))                           (setq column 0))))))))
1654    
       ;; See --directory/-L option above.  
       (when extra-load-path  
         (setq load-path (append (nreverse extra-load-path) load-path)))  
   
1655        ;; If 3 or more files visited, and not all visible,        ;; If 3 or more files visited, and not all visible,
1656        ;; show user what they all are.  But leave the last one current.        ;; show user what they all are.  But leave the last one current.
1657        (and (> file-count 2)        (and (> file-count 2)

Legend:
Removed from v.1.321.2.5  
changed lines
  Added in v.1.321.2.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26