[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Remove special requirement to disable startup message.

From: Mark Oteiza
Subject: [PATCH] Remove special requirement to disable startup message.
Date: Sat, 19 Dec 2015 17:51:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

* lisp/startup.el (inhibit-startup-echo-area-message): Replace custom
string with t.
(display-startup-echo-area-message): Only check if
inhibit-startup-echo-area-message is truthy.

After seeing a commentary on the variable here:


and reading bug#13208 and bug#12370, I am inclined to change this
behavior. Not only is the checking mechanism in
`display-startup-echo-area-message' naïve and error-prone (see
bug#13208), but it does nothing to stop the site from disabling the
message, which is the only tangible justification (found in bug#12730)
for the special treatment to exist. It is trivial for site-start.el,
default.el, or init.el to contain

  (defun display-startup-echo-area-message () nil)

or similar to disable the message for all users (example from bug#13208).

 lisp/startup.el | 41 ++++-------------------------------------
 1 file changed, 4 insertions(+), 37 deletions(-)

diff --git a/lisp/startup.el b/lisp/startup.el
index 1346310..0d3b44a 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -76,21 +76,10 @@ once you are familiar with the contents of the startup 
 (defvar startup-screen-inhibit-startup-screen nil)
-;; FIXME? Why does this get such weirdly extreme treatment, when the
-;; more important inhibit-startup-screen does not.
 (defcustom inhibit-startup-echo-area-message nil
-  "Non-nil inhibits the initial startup echo area message.
-Setting this variable takes effect
-only if you do it with the customization buffer
-or if your init file contains a line of this form:
- (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")
-If your init file is byte-compiled, use the following form
- (eval \\='(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\"))
-Thus, someone else using a copy of your init file will see the
-startup message unless he personally acts to inhibit it."
-  :type '(choice (const :tag "Don't inhibit")
-                (string :tag "Enter your user name, to inhibit"))
+  "Non-nil inhibits the initial startup echo area message."
+  :type '(choice (const :tag "Don't inhibit" nil)
+                (const :tag "Inhibit" t))
   :group 'initialization)
 (defcustom inhibit-default-init nil
@@ -2154,29 +2143,7 @@ Type \\[describe-distribution] for information on "))
   (let ((resize-mini-windows t))
     (or noninteractive                  ;(input-pending-p) init-file-had-error
        ;; t if the init file says to inhibit the echo area startup message.
-       (and inhibit-startup-echo-area-message
-            user-init-file
-            (or (and (get 'inhibit-startup-echo-area-message 'saved-value)
-                     (equal inhibit-startup-echo-area-message
-                            (if (equal init-file-user "")
-                                (user-login-name)
-                              init-file-user)))
-                ;; Wasn't set with custom; see if .emacs has a setq.
-                 (condition-case nil
-                     (with-temp-buffer
-                       (insert-file-contents user-init-file)
-                       (re-search-forward
-                        (concat
-                         "([ \t\n]*setq[ \t\n]+"
-                         "inhibit-startup-echo-area-message[ \t\n]+"
-                         (regexp-quote
-                          (prin1-to-string
-                           (if (equal init-file-user "")
-                               (user-login-name)
-                             init-file-user)))
-                         "[ \t\n]*)")
-                        nil t))
-                   (error nil))))
+       inhibit-startup-echo-area-message
        (message "%s" (startup-echo-area-message)))))
 (defun display-startup-screen (&optional concise)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]