diff options
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index c8b36e205fd..9f67dfde124 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -463,9 +463,6 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (and (string-match "\\`[[:alnum:]]" file) ;; The lower-case variants of RCS and CVS are for DOS/Windows. (not (member file '("RCS" "CVS" "rcs" "cvs"))) - ;; Avoid doing a `stat' when it isn't necessary because - ;; that can cause trouble when an NFS server is down. - (not (string-match "\\.elc?\\'" file)) (file-directory-p file) (let ((expanded (expand-file-name file))) (or (file-exists-p (expand-file-name ".nosearch" expanded)) @@ -645,16 +642,13 @@ It is the default value of the variable `top-level'." (list (default-value 'user-full-name))) ;; If the PWD environment variable isn't accurate, delete it. (let ((pwd (getenv "PWD"))) - (and (stringp pwd) - ;; Use FOO/., so that if FOO is a symlink, file-attributes - ;; describes the directory linked to, not FOO itself. + (and pwd (or (and default-directory (ignore-errors (equal (file-attributes - (concat (file-name-as-directory pwd) ".")) + (file-name-as-directory pwd)) (file-attributes - (concat (file-name-as-directory default-directory) - "."))))) + (file-name-as-directory default-directory))))) (setq process-environment (delete (concat "PWD=" pwd) process-environment))))) |