Mercurial > emacs
comparison lisp/startup.el @ 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 | c731b3aa52d0 |
children | 193c8aa827d1 |
comparison
equal
deleted
inserted
replaced
29125:63520d6017fb | 29126:36006315504c |
---|---|
695 (if (eq user-init-file t) | 695 (if (eq user-init-file t) |
696 (setq user-init-file nil)) | 696 (setq user-init-file nil)) |
697 ;; If we loaded a compiled file, set | 697 ;; If we loaded a compiled file, set |
698 ;; `user-init-file' to the source version if that | 698 ;; `user-init-file' to the source version if that |
699 ;; exists. | 699 ;; exists. |
700 (if (and user-init-file | 700 (when (and user-init-file |
701 (equal (file-name-extension user-init-file) | 701 (equal (file-name-extension user-init-file) |
702 "elc")) | 702 "elc") |
703 (let ((el (concat (file-name-sans-extension | 703 (file-exists-p user-init-file-1)) |
704 user-init-file) | 704 (when (file-newer-than-file-p |
705 ".el"))) | 705 user-init-file-1 user-init-file) |
706 (if (file-exists-p el) | 706 (message "Warning: %s is newer than %s" |
707 (setq user-init-file el)))) | 707 user-init-file-1 user-init-file) |
708 (sit-for 1)) | |
709 (setq user-init-file user-init-file-1)) | |
708 (or inhibit-default-init | 710 (or inhibit-default-init |
709 (let ((inhibit-startup-message nil)) | 711 (let ((inhibit-startup-message nil)) |
710 ;; Users are supposed to be told their rights. | 712 ;; Users are supposed to be told their rights. |
711 ;; (Plus how to get help and how to undo.) | 713 ;; (Plus how to get help and how to undo.) |
712 ;; Don't you dare turn this off for anyone | 714 ;; Don't you dare turn this off for anyone |