+2000-11-24 Gerd Moellmann <gerd@gnu.org>
+
+ * startup.el (command-line): Fix computation of the source file
+ for user-init-file when user-init-file is a compiled file.
+
2000-11-24 Miles Bader <miles@gnu.org>
* cus-edit.el (custom-filter-face-spec, custom-pre-filter-face-spec)
* ediff-diff.el: Moved variables around to have it compile under NT.
- * ediff-help.el (ediff-use-long-help-message): made it customizable.
+ * ediff-help.el (ediff-use-long-help-message): Made it customizable.
- * ediff-init.el (ediff-abbrev-jobname): use capitalize.
+ * ediff-init.el (ediff-abbrev-jobname): Use capitalize.
- * ediff-wind.el (ediff-skip-unsuitable-frames): deleted the
+ * ediff-wind.el (ediff-skip-unsuitable-frames): Deleted the
redundant skip-small-frames test.
- * viper-cmd.el (viper-change-state-to-vi): disable overwrite mode.
+ * viper-cmd.el (viper-change-state-to-vi): Disable overwrite mode.
(viper-downgrade-to-insert): protect against errors in hooks.
- * viper-init.el (viper-vi-state-hook,viper-insert-state-hook,
- viper-replace-state-hook,viper-emacs-state-hook): do cursor handling.
- (viper-restore-cursor-type,viper-set-insert-cursor-type): new
+ * viper-init.el (viper-vi-state-hook,viper-insert-state-hook)
+ (viper-replace-state-hook,viper-emacs-state-hook): Do cursor handling.
+ (viper-restore-cursor-type,viper-set-insert-cursor-type): New
functions.
- * viper-util.el (viper-memq-char): bug fixes.
+ * viper-util.el (viper-memq-char): Bug fixes.
- * viper.el (viper-mode): fix cursor handling.
+ * viper.el (viper-mode): Fix cursor handling.
2000-11-24 Kenichi Handa <handa@etl.go.jp>
;; into user-init-file.
(setq user-init-file t)
(load user-init-file-1 t t)
+
;; If we did not find the user's init file,
;; set user-init-file conclusively to nil;
;; don't let it be set from default.el.
(if (eq user-init-file t)
(setq user-init-file nil))
+
;; If we loaded a compiled file, set
;; `user-init-file' to the source version if that
;; exists.
(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))
+ "elc"))
+ (let* ((source (file-name-sans-extension user-init-file))
+ (alt (concat source ".el")))
+ (setq source (cond ((file-exists-p alt) alt)
+ ((file-exists-p source) source)
+ (t nil)))
+ (when source
+ (when (file-newer-than-file-p source user-init-file)
+ (message "Warning: %s is newer than %s"
+ source user-init-file)
+ (sit-for 1))
+ (setq user-init-file source))))
+
(or inhibit-default-init
(let ((inhibit-startup-message nil))
;; Users are supposed to be told their rights.