From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.devel Subject: [PATCH] Remove special requirement to disable startup message. Date: Sat, 19 Dec 2015 17:51:03 -0500 Message-ID: <878u4qdpd4.fsf@udel.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1450565503 32141 80.91.229.3 (19 Dec 2015 22:51:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Dec 2015 22:51:43 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 19 23:51:32 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aAQLa-0001sY-BP for ged-emacs-devel@m.gmane.org; Sat, 19 Dec 2015 23:51:30 +0100 Original-Received: from localhost ([::1]:39002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAQLZ-0003DG-Lm for ged-emacs-devel@m.gmane.org; Sat, 19 Dec 2015 17:51:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAQLM-0003Cr-MV for emacs-devel@gnu.org; Sat, 19 Dec 2015 17:51:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aAQLJ-0008Bz-GP for emacs-devel@gnu.org; Sat, 19 Dec 2015 17:51:16 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:52899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aAQLJ-0008Bp-9M for emacs-devel@gnu.org; Sat, 19 Dec 2015 17:51:13 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aAQLG-0001Dx-Qb for emacs-devel@gnu.org; Sat, 19 Dec 2015 23:51:10 +0100 Original-Received: from pool-96-227-83-242.phlapa.fios.verizon.net ([96.227.83.242]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Dec 2015 23:51:10 +0100 Original-Received: from mvoteiza by pool-96-227-83-242.phlapa.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 19 Dec 2015 23:51:10 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 89 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-96-227-83-242.phlapa.fios.verizon.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:FK/dIWfDG/2tFpRWAGG52LVvWSg= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196537 Archived-At: * 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: http://emacshorrors.com/posts/advertising-your-freedom.html 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 screen." (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 -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")) + "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) -- 2.6.4