("-bg" 1 x-handle-switch background-color)
("-background" 1 x-handle-switch background-color)
("-ms" 1 x-handle-switch mouse-color)
- ("-nb" 0 x-handle-switch icon-type nil)
+ ("-nbi" 0 x-handle-switch icon-type nil)
("-iconic" 0 x-handle-iconic)
("-xrm" 1 x-handle-xrm-switch)
("-cr" 1 x-handle-switch cursor-color)
(set-locale-environment nil)
+ ;; Convert preloaded file names to absolute.
+ (setq load-history
+ (mapcar (lambda (elt)
+ (if (and (stringp (car elt))
+ (not (file-name-absolute-p (car elt))))
+ (cons (locate-file (car elt) load-path
+ load-suffixes)
+ (cdr elt))
+ elt))
+ load-history))
+
;; Convert the arguments to Emacs internal representation.
(let ((args (cdr command-line-args)))
(while args
(and command-line-args
(setcdr command-line-args args)))
+ (run-hooks 'before-init-hook)
+
;; Under X Window, this creates the X frame and deletes the terminal frame.
(when (fboundp 'frame-initialize)
(frame-initialize))
(custom-reevaluate-setting 'blink-cursor-mode)
(custom-reevaluate-setting 'normal-erase-is-backspace)
(custom-reevaluate-setting 'tooltip-mode)
+ (custom-reevaluate-setting 'mouse-wheel-down-event)
+ (custom-reevaluate-setting 'mouse-wheel-up-event)
;; Register default TTY colors for the case the terminal hasn't a
;; terminal init file.
(old-font-list-limit font-list-limit)
(old-face-ignored-fonts face-ignored-fonts))
- (run-hooks 'before-init-hook)
-
;; Run the site-start library if it exists. The point of this file is
;; that it is run before .emacs. There is no point in doing this after
;; .emacs; that is useless.
(setq inhibit-startup-message nil)
;; Warn for invalid user name.
- (and init-file-user
- (not (file-directory-p (expand-file-name (concat "~" init-file-user))))
- (display-warning 'initialization
- (format "User %s has no home directory"
- init-file-user)
- :error))
+ (when init-file-user
+ (if (string-match "[~/:\n]" init-file-user)
+ (display-warning 'initialization
+ (format "Invalid user name %s"
+ init-file-user)
+ :error)
+ (if (file-directory-p (expand-file-name (concat "~" init-file-user)))
+ nil
+ (display-warning 'initialization
+ (format "User %s has no home directory"
+ init-file-user)
+ :error))))
;; Load that user's init file, or the default one, or none.
(let (debug-on-error-from-init-file
(when (eq user-init-file t)
;; If we did not find ~/.emacs, try
- ;; ~/.emacs.d/.emacs.
+ ;; ~/.emacs.d/init.el.
(let ((otherfile
(expand-file-name
- (file-name-nondirectory user-init-file-1)
+ "init"
(file-name-as-directory
- (expand-file-name
- ".emacs.d"
- (file-name-directory user-init-file-1))))))
+ (concat "~" init-file-user "/.emacs.d")))))
(load otherfile t t)
;; If we did not find the user's init file,
the user caused an input event by hitting a key or clicking with the
mouse."
(interactive)
- (push last-command-event unread-command-events)
+ (if (and (consp last-command-event)
+ (eq (posn-window (event-start last-command-event))
+ (selected-window)))
+ ;; This is a mouse-down event in the spash screen window.
+ ;; Ignore it and consume the corresponding mouse-up event.
+ (read-event)
+ (push last-command-event unread-command-events))
(throw 'exit nil))