(format "Invalid user name %s"
init-file-user)
:error)
- (if (file-directory-p (expand-file-name (concat "~" init-file-user)))
+ (if (file-directory-p (expand-file-name
+ ;; We don't support ~USER on MS-Windows except
+ ;; for the current user, and always load .emacs
+ ;; from the current user's home directory (see
+ ;; below). So always check "~", even if invoked
+ ;; with "-u USER", or if $USER or $LOGNAME are
+ ;; set to something different.
+ (if (eq system-type 'windows-nt)
+ "~"
+ (concat "~" init-file-user))))
nil
(display-warning 'initialization
(format "User %s has no home directory"
(set-buffer buffer)
(erase-buffer)
(if pure-space-overflow
- (insert "Warning Warning Pure space overflow Warning Warning\n"))
+ (insert "\
+Warning Warning!!! Pure space overflow !!!Warning Warning
+\(See the node Building Emacs in the Lisp manual for details.)\n"))
(fancy-splash-head)
(apply #'fancy-splash-insert text)
(fancy-splash-tail)
(fancy-splash-outer-buffer (current-buffer))
splash-buffer
(old-minor-mode-map-alist minor-mode-map-alist)
+ (old-emulation-mode-map-alists emulation-mode-map-alists)
(frame (fancy-splash-frame))
timer)
(save-selected-window
(setq cursor-type nil
display-hourglass nil
minor-mode-map-alist nil
+ emulation-mode-map-alists nil
buffer-undo-list t
mode-line-format (propertize "---- %b %-"
'face '(:weight bold))
(recursive-edit))
(cancel-timer timer)
(setq display-hourglass old-hourglass
- minor-mode-map-alist old-minor-mode-map-alist)
+ minor-mode-map-alist old-minor-mode-map-alist
+ emulation-mode-map-alists old-emulation-mode-map-alists)
(kill-buffer splash-buffer))))))
(defun fancy-splash-frame ()
(propertize "---- %b %-" 'face '(:weight bold)))
(if pure-space-overflow
- (insert "Warning Warning Pure space overflow Warning Warning\n"))
+ (insert "\
+Warning Warning!!! Pure space overflow !!!Warning Warning
+\(See the node Building Emacs in the Lisp manual for details.)\n"))
;; The convention for this piece of code is that
;; each piece of output starts with one or two newlines
;; Display the input that we set up in the buffer.
(set-buffer-modified-p nil)
(goto-char (point-min))
- (save-window-excursion
- (condition-case nil
- (switch-to-buffer (current-buffer))
- ;; In case we're in a dedicated or minibuffer-only window.
- (error
- ;; There's no point is using pop-to-buffer since creating
- ;; a new frame will generate enough events that the
- ;; subsequent `sit-for' will immediately return anyway.
- ;; (pop-to-buffer (current-buffer))
- ))
- (sit-for 120)))
+ (if (or (window-minibuffer-p)
+ (window-dedicated-p (selected-window)))
+ ;; There's no point is using pop-to-buffer since creating
+ ;; a new frame will generate enough events that the
+ ;; subsequent `sit-for' will immediately return anyway.
+ nil ;; (pop-to-buffer (current-buffer))
+ (save-window-excursion
+ (switch-to-buffer (current-buffer))
+ (sit-for 120))))
;; Unwind ... ensure splash buffer is killed
(kill-buffer "GNU Emacs"))))
(when init-file-had-error
(sit-for 2))
+ (when (and pure-space-overflow
+ (not noninteractive))
+ (display-warning
+ 'initialization
+ "Building Emacs overflowed pure space. See \"(elisp)Building Emacs\" for more information."
+ ;; FIXME: Tell the user what kind of problems are possible and how to fix
+ ;; the overflow.
+ :warning))
+
(when command-line-args-left
;; We have command args; process them.
(let ((dir command-line-default-directory)