]> git.eshelyaron.com Git - emacs.git/commitdiff
; Simplify 'inhibit-startup-echo-area-message'.
authorEshel Yaron <me@eshelyaron.com>
Sat, 26 Apr 2025 07:24:09 +0000 (09:24 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 26 Apr 2025 09:22:42 +0000 (11:22 +0200)
doc/lispref/os.texi
lisp/startup.el

index 21f92706a4c33b385e52caf9f9a6a3639c48f40c..c5a1b84a803f962debd80e7fa3385e0b458f147f 100644 (file)
@@ -303,22 +303,8 @@ If its value is @code{t}, Emacs displays the @file{*scratch*} buffer.
 @end defopt
 
 @defopt inhibit-startup-echo-area-message
-This variable controls the display of the startup echo area message.
-You can suppress the startup echo area message by adding text with this
-form to your init file:
-
-@example
-(setq inhibit-startup-echo-area-message
-      "@var{your-login-name}")
-@end example
-
-Emacs explicitly checks for an expression as shown above in your init
-file; your login name must appear in the expression as a Lisp string
-constant.  You can also use the Customize interface.  Other methods of
-setting @code{inhibit-startup-echo-area-message} to the same value do
-not inhibit the startup message.  This way, you can easily inhibit the
-message for yourself if you wish, but thoughtless copying of your init
-file will not inhibit the message for someone else.
+This variable controls the display of the startup echo area message, set
+it to non-@code{nil} to suppress the startup echo area message.
 @end defopt
 
 @defopt initial-scratch-message
index 86443339ce5cb07e30729a15efbb9cc1bf84b63a..d1f6a0c17accf0f2955a17a6fe442915f374f4b5 100644 (file)
@@ -78,26 +78,8 @@ once you are familiar with the contents of the startup screen."
 ;; they will do so with knowledge of why the Emacs developers think
 ;; this is a bad idea.
 (defcustom inhibit-startup-echo-area-message nil
-  "Non-nil inhibits the initial startup echo area message.
-
-The startup message is in the echo area as it provides information
-about GNU Emacs and the GNU system in general, which we want all
-users to see.  As this is the least intrusive startup message,
-this variable gets specialized treatment to prevent the message
-from being disabled site-wide by systems administrators, while
-still allowing individual users to do so.
-
-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
-instead:
- (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")))
+  "Whether to inhibit the initial startup echo area message."
+  :type 'boolean)
 
 (defcustom inhibit-default-init nil
   "Non-nil inhibits loading the `default' library."
@@ -2390,31 +2372,7 @@ Type \\[describe-distribution] for information on "))
 
 (defun display-startup-echo-area-message ()
   (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))))
+    (or noninteractive inhibit-startup-echo-area-message
        (message "%s" (startup-echo-area-message)))))
 
 (defun display-startup-screen (&optional concise)