(defvar init-file-debug nil)
-(defvar init-file-had-error nil)
+(defvar init-file-had-error nil
+ "Non-nil if there was an error loading the user's init file.")
(defvar normal-top-level-add-subdirs-inode-list nil)
(custom-reevaluate-setting 'mouse-wheel-up-event)
(custom-reevaluate-setting 'file-name-shadow-mode)
(custom-reevaluate-setting 'send-mail-function)
+ (custom-reevaluate-setting 'focus-follows-mouse)
;; Register default TTY colors for the case the terminal hasn't a
;; terminal init file.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar fancy-splash-text
- '((:face variable-pitch
- "You can do basic editing with the menu bar and scroll bar \
-using the mouse.\n\n"
- :face (variable-pitch :weight bold)
+ '((:face (variable-pitch :weight bold)
"Important Help menu items:\n"
:face variable-pitch
(lambda ()
"\n")))
:face variable-pitch "\
Emacs FAQ\tFrequently asked questions and answers
-Read the Emacs Manual\tView the Emacs manual using Info
-\(Non)Warranty\tGNU Emacs comes with "
+View Emacs Manual\tView the Emacs manual using Info
+Absence of Warranty\tGNU Emacs comes with "
:face (variable-pitch :slant oblique)
"ABSOLUTELY NO WARRANTY\n"
:face variable-pitch
Copying Conditions\tConditions for redistributing and changing Emacs
Getting New Versions\tHow to obtain the latest version of Emacs
More Manuals / Ordering Manuals Buying printed manuals from the FSF\n")
- (:face variable-pitch
- "You can do basic editing with the menu bar and scroll bar \
-using the mouse.\n\n"
- :face (variable-pitch :weight bold)
- "Useful File menu items:\n"
- :face variable-pitch "\
-Exit Emacs\t(Or type Control-x followed by Control-c)
+ (:face (variable-pitch :weight bold)
+ "Useful File menu items:\n"
+ :face variable-pitch
+ "Exit Emacs\t\t(Or type "
+ :face default
+ "Control-x"
+ :face variable-pitch
+ " followed by "
+ :face default
+ "Control-c"
+ :face variable-pitch
+ ")
Recover Crashed Session\tRecover files you were editing before a crash
+
"
))
"A list of texts to show in the middle part of splash screens.
"GNU Emacs is one component of the GNU/Linux operating system."
"GNU Emacs is one component of the GNU operating system."))
(insert "\n")
- (if fancy-splash-outer-buffer
- (fancy-splash-insert
- :face 'variable-pitch
- (substitute-command-keys
- (concat
- "Type \\[recenter] to begin editing"
- (if (equal (buffer-name fancy-splash-outer-buffer)
- "*scratch*")
- ".\n"
- " your file.\n"))))))
+ (fancy-splash-insert
+ :face 'variable-pitch
+ "You can do basic editing with the menu bar and scroll bar \
+using the mouse.\n\n")
+ (when fancy-splash-outer-buffer
+ (fancy-splash-insert
+ :face 'variable-pitch
+ "Type "
+ :face 'default
+ (substitute-command-keys
+ "\\[recenter]")
+ :face 'variable-pitch
+ " to begin editing"
+ (if (equal (buffer-name fancy-splash-outer-buffer)
+ "*scratch*")
+ ".\n"
+ " your file.\n"))))
(defun fancy-splash-tail ()
"Insert the tail part of the splash screen into the current buffer."
t)
(fancy-splash-insert :face '(variable-pitch :foreground "red")
"\n\nIf an Emacs session crashed recently, "
- "type M-x recover-session RET\nto recover"
+ "type "
+ :face '(fixed-pitch :foreground "red")
+ "Meta-x recover-session RET"
+ :face '(variable-pitch :foreground "red")
+ "\nto recover"
" the files you were editing."))))
(defun fancy-splash-screens-1 (buffer)
(defun fancy-splash-screens (&optional hide-on-input)
"Display fancy splash screens when Emacs starts."
- (setq fancy-splash-help-echo (startup-echo-area-message))
(if hide-on-input
(let ((old-hourglass display-hourglass)
(fancy-splash-outer-buffer (current-buffer))
(save-selected-window
(select-frame frame)
(switch-to-buffer "GNU Emacs")
- (setq tab-width 20)
(setq splash-buffer (current-buffer))
(catch 'stop-splashing
(unwind-protect
- (let ((map (make-sparse-keymap)))
+ (let ((map (make-sparse-keymap))
+ (cursor-type nil))
(use-local-map map)
(define-key map [switch-frame] 'ignore)
(define-key map [t] 'fancy-splash-default-action)
(define-key map [mouse-movement] 'ignore)
(define-key map [mode-line t] 'ignore)
- (setq cursor-type nil
- display-hourglass nil
+ (setq display-hourglass nil
minor-mode-map-alist nil
emulation-mode-map-alists nil
buffer-undo-list t
timer (run-with-timer 0 fancy-splash-delay
#'fancy-splash-screens-1
splash-buffer))
+ (message "%s" (startup-echo-area-message))
(recursive-edit))
(cancel-timer timer)
(setq display-hourglass old-hourglass
(if (or (window-minibuffer-p)
(window-dedicated-p (selected-window)))
(pop-to-buffer (current-buffer))
- (switch-to-buffer "GNU Emacs"))
+ (switch-to-buffer "*About GNU Emacs*"))
(setq buffer-read-only nil)
(erase-buffer)
(if pure-space-overflow
(let (fancy-splash-outer-buffer)
(fancy-splash-head)
(dolist (text fancy-splash-text)
- (apply #'fancy-splash-insert text))
+ (apply #'fancy-splash-insert text)
+ (insert "\n"))
+ (skip-chars-backward "\n")
+ (delete-region (point) (point-max))
+ (insert "\n")
(fancy-splash-tail)
(set-buffer-modified-p nil)
(setq buffer-read-only t)
auto-save-list-file-prefix)))
t)
(insert "\n\nIf an Emacs session crashed recently, "
- "type M-x recover-session RET\nto recover"
+ "type Meta-x recover-session RET\nto recover"
" the files you were editing."))
;; Display the input that we set up in the buffer.
(error (pop-to-buffer (current-buffer))))))
;; Unwind ... ensure splash buffer is killed
(if hide-on-input
- (kill-buffer "GNU Emacs")))))
+ (kill-buffer "GNU Emacs")
+ (switch-to-buffer "GNU Emacs")
+ (rename-buffer "*About GNU Emacs*" t)))))
(defun startup-echo-area-message ()
(defun display-splash-screen (&optional hide-on-input)
"Display splash screen according to display.
Fancy splash screens are used on graphic displays,
-normal otherwise."
- (interactive)
+normal otherwise.
+With a prefix argument, any user input hides the splash screen."
+ (interactive "P")
(if (use-fancy-splash-screens-p)
(fancy-splash-screens hide-on-input)
(normal-splash-screen hide-on-input)))
(setq line 0)
(unless (< column 1)
(move-to-column (1- column)))
- (setq column 0))))))))
+ (setq column 0))))))
+ ;; In unusual circumstances, the execution of Lisp code due
+ ;; to command-line options can cause the last visible frame
+ ;; to be deleted. In this case, kill emacs to avoid an
+ ;; abort later.
+ (unless (frame-live-p (selected-frame)) (kill-emacs nil))))
;; If 3 or more files visited, and not all visible,
;; show user what they all are. But leave the last one current.