aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters2002-05-26 20:49:28 +0000
committerColin Walters2002-05-26 20:49:28 +0000
commit1b207153d00f71fcc2f0d817a2a0cca9706acb54 (patch)
tree97958e6b6442bb77b6204bdbcc6143c1ffbcb785
parent588c915a8e2325a1965bc665b9c8aee008b5da98 (diff)
downloademacs-1b207153d00f71fcc2f0d817a2a0cca9706acb54.tar.gz
emacs-1b207153d00f71fcc2f0d817a2a0cca9706acb54.zip
(command-line): Use `when', `unless'.
(command-line-1): New argument "--nosplash". Handle it. (inhibit-splash-screen): New variable alias for `inhibit-startup-message'.
-rw-r--r--lisp/startup.el38
1 files changed, 23 insertions, 15 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index f4cc9c81875..4a2e6707a78 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -70,6 +70,9 @@
70;; -no-site-file Do not load "site-start.el". (This is the ONLY 70;; -no-site-file Do not load "site-start.el". (This is the ONLY
71;; --no-site-file way to prevent loading that file.) 71;; --no-site-file way to prevent loading that file.)
72;; ------------------------- 72;; -------------------------
73;; -nosplash Don't display a splash screen on startup.
74;; --nosplash
75;; -------------------------
73;; -u USER Load USER's init file instead of the init 76;; -u USER Load USER's init file instead of the init
74;; -user USER file belonging to the user starting Emacs. 77;; -user USER file belonging to the user starting Emacs.
75;; --user USER 78;; --user USER
@@ -136,6 +139,8 @@ with the contents of the startup message."
136 :type 'boolean 139 :type 'boolean
137 :group 'initialization) 140 :group 'initialization)
138 141
142(defvaralias 'inhibit-splash-screen 'inhibit-startup-message)
143
139(defcustom inhibit-startup-echo-area-message nil 144(defcustom inhibit-startup-echo-area-message nil
140 "*Non-nil inhibits the initial startup echo area message. 145 "*Non-nil inhibits the initial startup echo area message.
141Setting this variable takes effect 146Setting this variable takes effect
@@ -753,20 +758,20 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
753 (argi (pop args)) 758 (argi (pop args))
754 (argval nil)) 759 (argval nil))
755 ;; Handle --OPTION=VALUE format. 760 ;; Handle --OPTION=VALUE format.
756 (if (and (string-match "\\`--" argi) 761 (when (and (string-match "\\`--" argi)
757 (string-match "=" argi)) 762 (string-match "=" argi))
758 (setq argval (substring argi (match-end 0)) 763 (setq argval (substring argi (match-end 0))
759 argi (substring argi 0 (match-beginning 0)))) 764 argi (substring argi 0 (match-beginning 0))))
760 (or (equal argi "--") 765 (unless (equal argi "--")
761 (let ((completion (try-completion argi longopts))) 766 (let ((completion (try-completion argi longopts)))
762 (if (eq completion t) 767 (if (eq completion t)
763 (setq argi (substring argi 1)) 768 (setq argi (substring argi 1))
764 (if (stringp completion) 769 (if (stringp completion)
765 (let ((elt (assoc completion longopts))) 770 (let ((elt (assoc completion longopts)))
766 (or elt 771 (or elt
767 (error "Option `%s' is ambiguous" argi)) 772 (error "Option `%s' is ambiguous" argi))
768 (setq argi (substring (car elt) 1))) 773 (setq argi (substring (car elt) 1)))
769 (setq argval nil))))) 774 (setq argval nil)))))
770 (cond 775 (cond
771 ((member argi '("-q" "-no-init-file")) 776 ((member argi '("-q" "-no-init-file"))
772 (setq init-file-user nil)) 777 (setq init-file-user nil))
@@ -1503,7 +1508,7 @@ normal otherwise."
1503 ;; and long versions of what's on command-switch-alist. 1508 ;; and long versions of what's on command-switch-alist.
1504 (longopts 1509 (longopts
1505 (append '(("--funcall") ("--load") ("--insert") ("--kill") 1510 (append '(("--funcall") ("--load") ("--insert") ("--kill")
1506 ("--directory") ("--eval") ("--execute") 1511 ("--directory") ("--eval") ("--execute") ("--nosplash")
1507 ("--find-file") ("--visit") ("--file")) 1512 ("--find-file") ("--visit") ("--file"))
1508 (mapcar (lambda (elt) 1513 (mapcar (lambda (elt)
1509 (list (concat "-" (car elt)))) 1514 (list (concat "-" (car elt))))
@@ -1556,6 +1561,9 @@ normal otherwise."
1556 (funcall (cdr tem) argi)) 1561 (funcall (cdr tem) argi))
1557 (funcall (cdr tem) argi))) 1562 (funcall (cdr tem) argi)))
1558 1563
1564 ((string-equal argi "-nosplash")
1565 (setq inhibit-startup-message t))
1566
1559 ((member argi '("-f" ;what the manual claims 1567 ((member argi '("-f" ;what the manual claims
1560 "-funcall" 1568 "-funcall"
1561 "-e")) ; what the source used to say 1569 "-e")) ; what the source used to say