diff options
| author | Gerd Moellmann | 2000-11-24 12:29:32 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-11-24 12:29:32 +0000 |
| commit | 9aa5f148cad4ca3166c3eb9b4e96db43c3dea079 (patch) | |
| tree | af30201366b135800a6d9d723cb9623c582deb89 | |
| parent | 67ee1125be50b6fd4e762308b87ed69d67528f91 (diff) | |
| download | emacs-9aa5f148cad4ca3166c3eb9b4e96db43c3dea079.tar.gz emacs-9aa5f148cad4ca3166c3eb9b4e96db43c3dea079.zip | |
(command-line): Fix computation of the source file
for user-init-file when user-init-file is a compiled file.
| -rw-r--r-- | lisp/ChangeLog | 23 | ||||
| -rw-r--r-- | lisp/startup.el | 23 |
2 files changed, 29 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fc25e4a2d26..0b1989ad4f3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-11-24 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * startup.el (command-line): Fix computation of the source file | ||
| 4 | for user-init-file when user-init-file is a compiled file. | ||
| 5 | |||
| 1 | 2000-11-24 Miles Bader <miles@gnu.org> | 6 | 2000-11-24 Miles Bader <miles@gnu.org> |
| 2 | 7 | ||
| 3 | * cus-edit.el (custom-filter-face-spec, custom-pre-filter-face-spec) | 8 | * cus-edit.el (custom-filter-face-spec, custom-pre-filter-face-spec) |
| @@ -21,24 +26,24 @@ | |||
| 21 | 26 | ||
| 22 | * ediff-diff.el: Moved variables around to have it compile under NT. | 27 | * ediff-diff.el: Moved variables around to have it compile under NT. |
| 23 | 28 | ||
| 24 | * ediff-help.el (ediff-use-long-help-message): made it customizable. | 29 | * ediff-help.el (ediff-use-long-help-message): Made it customizable. |
| 25 | 30 | ||
| 26 | * ediff-init.el (ediff-abbrev-jobname): use capitalize. | 31 | * ediff-init.el (ediff-abbrev-jobname): Use capitalize. |
| 27 | 32 | ||
| 28 | * ediff-wind.el (ediff-skip-unsuitable-frames): deleted the | 33 | * ediff-wind.el (ediff-skip-unsuitable-frames): Deleted the |
| 29 | redundant skip-small-frames test. | 34 | redundant skip-small-frames test. |
| 30 | 35 | ||
| 31 | * viper-cmd.el (viper-change-state-to-vi): disable overwrite mode. | 36 | * viper-cmd.el (viper-change-state-to-vi): Disable overwrite mode. |
| 32 | (viper-downgrade-to-insert): protect against errors in hooks. | 37 | (viper-downgrade-to-insert): protect against errors in hooks. |
| 33 | 38 | ||
| 34 | * viper-init.el (viper-vi-state-hook,viper-insert-state-hook, | 39 | * viper-init.el (viper-vi-state-hook,viper-insert-state-hook) |
| 35 | viper-replace-state-hook,viper-emacs-state-hook): do cursor handling. | 40 | (viper-replace-state-hook,viper-emacs-state-hook): Do cursor handling. |
| 36 | (viper-restore-cursor-type,viper-set-insert-cursor-type): new | 41 | (viper-restore-cursor-type,viper-set-insert-cursor-type): New |
| 37 | functions. | 42 | functions. |
| 38 | 43 | ||
| 39 | * viper-util.el (viper-memq-char): bug fixes. | 44 | * viper-util.el (viper-memq-char): Bug fixes. |
| 40 | 45 | ||
| 41 | * viper.el (viper-mode): fix cursor handling. | 46 | * viper.el (viper-mode): Fix cursor handling. |
| 42 | 47 | ||
| 43 | 2000-11-24 Kenichi Handa <handa@etl.go.jp> | 48 | 2000-11-24 Kenichi Handa <handa@etl.go.jp> |
| 44 | 49 | ||
diff --git a/lisp/startup.el b/lisp/startup.el index 8cc24039b12..5ee789657da 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -828,24 +828,31 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 828 | ;; into user-init-file. | 828 | ;; into user-init-file. |
| 829 | (setq user-init-file t) | 829 | (setq user-init-file t) |
| 830 | (load user-init-file-1 t t) | 830 | (load user-init-file-1 t t) |
| 831 | |||
| 831 | ;; If we did not find the user's init file, | 832 | ;; If we did not find the user's init file, |
| 832 | ;; set user-init-file conclusively to nil; | 833 | ;; set user-init-file conclusively to nil; |
| 833 | ;; don't let it be set from default.el. | 834 | ;; don't let it be set from default.el. |
| 834 | (if (eq user-init-file t) | 835 | (if (eq user-init-file t) |
| 835 | (setq user-init-file nil)) | 836 | (setq user-init-file nil)) |
| 837 | |||
| 836 | ;; If we loaded a compiled file, set | 838 | ;; If we loaded a compiled file, set |
| 837 | ;; `user-init-file' to the source version if that | 839 | ;; `user-init-file' to the source version if that |
| 838 | ;; exists. | 840 | ;; exists. |
| 839 | (when (and user-init-file | 841 | (when (and user-init-file |
| 840 | (equal (file-name-extension user-init-file) | 842 | (equal (file-name-extension user-init-file) |
| 841 | "elc") | 843 | "elc")) |
| 842 | (file-exists-p user-init-file-1)) | 844 | (let* ((source (file-name-sans-extension user-init-file)) |
| 843 | (when (file-newer-than-file-p | 845 | (alt (concat source ".el"))) |
| 844 | user-init-file-1 user-init-file) | 846 | (setq source (cond ((file-exists-p alt) alt) |
| 845 | (message "Warning: %s is newer than %s" | 847 | ((file-exists-p source) source) |
| 846 | user-init-file-1 user-init-file) | 848 | (t nil))) |
| 847 | (sit-for 1)) | 849 | (when source |
| 848 | (setq user-init-file user-init-file-1)) | 850 | (when (file-newer-than-file-p source user-init-file) |
| 851 | (message "Warning: %s is newer than %s" | ||
| 852 | source user-init-file) | ||
| 853 | (sit-for 1)) | ||
| 854 | (setq user-init-file source)))) | ||
| 855 | |||
| 849 | (or inhibit-default-init | 856 | (or inhibit-default-init |
| 850 | (let ((inhibit-startup-message nil)) | 857 | (let ((inhibit-startup-message nil)) |
| 851 | ;; Users are supposed to be told their rights. | 858 | ;; Users are supposed to be told their rights. |