Commit c047136e authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(command-line): Determine source file of compiled

user init file differently.  Warn if compiled user init file
is older than its source file.
parent f95c3f91
......@@ -697,14 +697,16 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
;; If we loaded a compiled file, set
;; `user-init-file' to the source version if that
;; exists.
(if (and user-init-file
(when (and user-init-file
(equal (file-name-extension user-init-file)
(let ((el (concat (file-name-sans-extension
(if (file-exists-p el)
(setq user-init-file el))))
(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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment