1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-13 16:38:14 +00:00

(normal-top-level-add-subdirs-to-load-path):

Avoid unnecessarily checking system-type.
(normal-top-level): Set TERM to "dumb".  Simplify.
This commit is contained in:
Stefan Monnier 2004-08-20 22:40:34 +00:00
parent 88b4ca188b
commit fcaf7de969

View File

@ -220,7 +220,7 @@ Setting `init-file-user' does not prevent Emacs from loading
"File containing site-wide run-time initializations. "File containing site-wide run-time initializations.
This file is loaded at run-time before `~/.emacs'. It contains inits This file is loaded at run-time before `~/.emacs'. It contains inits
that need to be in place for the entire site, but which, due to their that need to be in place for the entire site, but which, due to their
higher incidence of change, don't make sense to load into emacs' higher incidence of change, don't make sense to load into Emacs's
dumped image. Thus, the run-time load order is: 1. file described in dumped image. Thus, the run-time load order is: 1. file described in
this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'. this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.
@ -293,7 +293,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
(let* ((this-dir (car dirs)) (let* ((this-dir (car dirs))
(contents (directory-files this-dir)) (contents (directory-files this-dir))
(default-directory this-dir) (default-directory this-dir)
(canonicalized (and (eq system-type 'windows-nt) (canonicalized (if (fboundp 'untranslated-canonical-name)
(untranslated-canonical-name this-dir)))) (untranslated-canonical-name this-dir))))
;; The Windows version doesn't report meaningful inode ;; The Windows version doesn't report meaningful inode
;; numbers, so use the canonicalized absolute file name of the ;; numbers, so use the canonicalized absolute file name of the
@ -343,12 +343,14 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
;; Give *Messages* the same default-directory as *scratch*, ;; Give *Messages* the same default-directory as *scratch*,
;; just to keep things predictable. ;; just to keep things predictable.
(let ((dir default-directory)) (let ((dir default-directory))
(save-excursion (with-current-buffer "*Messages*"
(set-buffer (get-buffer "*Messages*"))
(setq default-directory dir))) (setq default-directory dir)))
;; `user-full-name' is now known; reset its standard-value here. ;; `user-full-name' is now known; reset its standard-value here.
(put 'user-full-name 'standard-value (put 'user-full-name 'standard-value
(list (default-value 'user-full-name))) (list (default-value 'user-full-name)))
;; Subprocesses of Emacs do not have direct access to the terminal,
;; so unless told otherwise they should only assume a dumb terminal.
(setenv "TERM" "dumb")
;; For root, preserve owner and group when editing files. ;; For root, preserve owner and group when editing files.
(if (equal (user-uid) 0) (if (equal (user-uid) 0)
(setq backup-by-copying-when-mismatch t)) (setq backup-by-copying-when-mismatch t))
@ -357,19 +359,12 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
;; of that dir into load-path, ;; of that dir into load-path,
;; Look for a leim-list.el file too. Loading it will register ;; Look for a leim-list.el file too. Loading it will register
;; available input methods. ;; available input methods.
(let ((tail load-path) (dolist (dir load-path)
new) (let ((default-directory dir))
(while tail (load (expand-file-name "subdirs.el") t t t))
(push (car tail) new) (let ((default-directory dir))
(condition-case nil (load (expand-file-name "leim-list.el") t t t)))
(let ((default-directory (car tail))) (unless (eq system-type 'vax-vms)
(load (expand-file-name "subdirs.el" (car tail)) t t t)))
(condition-case nil
(let ((default-directory (car tail)))
(load (expand-file-name "leim-list.el" (car tail)) t t t)))
(setq tail (cdr tail))))
(if (not (eq system-type 'vax-vms))
(progn
;; If the PWD environment variable isn't accurate, delete it. ;; If the PWD environment variable isn't accurate, delete it.
(let ((pwd (getenv "PWD"))) (let ((pwd (getenv "PWD")))
(and (stringp pwd) (and (stringp pwd)
@ -382,7 +377,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
"."))) ".")))
(setq process-environment (setq process-environment
(delete (concat "PWD=" pwd) (delete (concat "PWD=" pwd)
process-environment))))))) process-environment))))))
(setq default-directory (abbreviate-file-name default-directory)) (setq default-directory (abbreviate-file-name default-directory))
(let ((menubar-bindings-done nil)) (let ((menubar-bindings-done nil))
(unwind-protect (unwind-protect