Mercurial > emacs
changeset 29126:36006315504c
(command-line): Determine source file of compiled
user init file differently. Warn if compiled user init file
is older than its source file.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 23 May 2000 22:03:27 +0000 |
parents | 63520d6017fb |
children | 9147871ea54d |
files | lisp/startup.el |
diffstat | 1 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/startup.el Tue May 23 22:00:25 2000 +0000 +++ b/lisp/startup.el Tue May 23 22:03:27 2000 +0000 @@ -697,14 +697,16 @@ ;; If we loaded a compiled file, set ;; `user-init-file' to the source version if that ;; exists. - (if (and user-init-file - (equal (file-name-extension user-init-file) - "elc")) - (let ((el (concat (file-name-sans-extension - user-init-file) - ".el"))) - (if (file-exists-p el) - (setq user-init-file el)))) + (when (and user-init-file + (equal (file-name-extension user-init-file) + "elc") + (file-exists-p user-init-file-1)) + (when (file-newer-than-file-p + user-init-file-1 user-init-file) + (message "Warning: %s is newer than %s" + user-init-file-1 user-init-file) + (sit-for 1)) + (setq user-init-file user-init-file-1)) (or inhibit-default-init (let ((inhibit-startup-message nil)) ;; Users are supposed to be told their rights.