aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-02-12 20:01:43 +0000
committerRichard M. Stallman1994-02-12 20:01:43 +0000
commit1d7da582b401e1859d61d3c2d91bc7a70e1dfd6d (patch)
tree3b8fc455495f290f35448efbfdb7557b24cde9e6
parent19ae9866c9db33e9e3809c9f14ea19b1958bc285 (diff)
downloademacs-1d7da582b401e1859d61d3c2d91bc7a70e1dfd6d.tar.gz
emacs-1d7da582b401e1859d61d3c2d91bc7a70e1dfd6d.zip
(inhibit-startup-echo-area-message): New variable.
(command-line-1): Undo prev change. New test for whether to suppress echo area message. Update copyright year in displayed message.
-rw-r--r--lisp/startup.el38
1 files changed, 33 insertions, 5 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index c006ad4fc16..ae34c9db10e 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1,6 +1,6 @@
1;;; startup.el --- process Emacs shell arguments 1;;; startup.el --- process Emacs shell arguments
2 2
3;; Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc. 3;; Copyright (C) 1985, 1986, 1992, 1994 Free Software Foundation, Inc.
4 4
5;; Maintainer: FSF 5;; Maintainer: FSF
6;; Keywords: internal 6;; Keywords: internal
@@ -58,10 +58,18 @@
58(defvar command-line-processed nil "t once command line has been processed") 58(defvar command-line-processed nil "t once command line has been processed")
59 59
60(defconst inhibit-startup-message nil 60(defconst inhibit-startup-message nil
61 "*Non-nil inhibits the initial startup messages. 61 "*Non-nil inhibits the initial startup message.
62This is for use in your personal init file, once you are familiar 62This is for use in your personal init file, once you are familiar
63with the contents of the startup message.") 63with the contents of the startup message.")
64 64
65(defconst inhibit-startup-echo-area-message nil
66 "*Non-nil inhibits the initial startup echo area message.
67Inhibition takes effect only if your `.emacs' file contains
68a line of the form
69 (setq inhibit-startup-echo-area-message "YOUR-USER-NAME")
70Thus, someone else using a copy of your `.emacs' file will see
71the startup message unless he personally acts to inhibit it.")
72
65(defconst inhibit-default-init nil 73(defconst inhibit-default-init nil
66 "*Non-nil inhibits loading the `default' library.") 74 "*Non-nil inhibits loading the `default' library.")
67 75
@@ -327,8 +335,28 @@ this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.")
327 335
328(defun command-line-1 (command-line-args-left) 336(defun command-line-1 (command-line-args-left)
329 (or noninteractive (input-pending-p) init-file-had-error 337 (or noninteractive (input-pending-p) init-file-had-error
330 (if (eq (key-binding "\C-h\C-p") 'describe-project) 338 (and inhibit-startup-echo-area-message
331 (message "For more about the GNU Project, of which GNU Emacs is part, type C-h C-p."))) 339 (let ((buffer (get-buffer-create " *temp*")))
340 (prog1
341 (condition-case nil
342 (save-excursion
343 (set-buffer buffer)
344 (insert-file-contents user-init-file)
345 (re-search-forward
346 (concat
347 "(setq inhibit-startup-echo-area-message[ \t]+"
348 (prin1-to-string
349 (if (string= init-file-user "")
350 (user-login-name)
351 init-file-user))
352 "[ \t]*)")
353 nil t))
354 (error nil))
355 (kill-buffer buffer))))
356 (message (if (eq (key-binding "\C-h\C-p") 'describe-project)
357 "For information about the GNU Project and its goals, type C-h C-p."
358 (substitute-command-keys
359 "For information about the GNU Project and its goals, type \\[describe-project]."))))
332 (if (null command-line-args-left) 360 (if (null command-line-args-left)
333 (cond ((and (not inhibit-startup-message) (not noninteractive) 361 (cond ((and (not inhibit-startup-message) (not noninteractive)
334 ;; Don't clobber a non-scratch buffer if init file 362 ;; Don't clobber a non-scratch buffer if init file
@@ -357,7 +385,7 @@ this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.")
357 (progn 385 (progn
358 (insert (emacs-version) 386 (insert (emacs-version)
359 " 387 "
360Copyright (C) 1993 Free Software Foundation, Inc.\n\n") 388Copyright (C) 1994 Free Software Foundation, Inc.\n\n")
361 ;; If keys have their default meanings, 389 ;; If keys have their default meanings,
362 ;; use precomputed string to save lots of time. 390 ;; use precomputed string to save lots of time.
363 (if (and (eq (key-binding "\C-h") 'help-command) 391 (if (and (eq (key-binding "\C-h") 'help-command)