summaryrefslogtreecommitdiff
path: root/lisp/startup.el
diff options
context:
space:
mode:
authorColin Walters <walters@gnu.org>2002-05-26 20:49:28 +0000
committerColin Walters <walters@gnu.org>2002-05-26 20:49:28 +0000
commit1b207153d00f71fcc2f0d817a2a0cca9706acb54 (patch)
tree97958e6b6442bb77b6204bdbcc6143c1ffbcb785 /lisp/startup.el
parent588c915a8e2325a1965bc665b9c8aee008b5da98 (diff)
downloademacs-1b207153d00f71fcc2f0d817a2a0cca9706acb54.tar.gz
(command-line): Use `when', `unless'.
(command-line-1): New argument "--nosplash". Handle it. (inhibit-splash-screen): New variable alias for `inhibit-startup-message'.
Diffstat (limited to 'lisp/startup.el')
-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 @@
;; -no-site-file Do not load "site-start.el". (This is the ONLY
;; --no-site-file way to prevent loading that file.)
;; -------------------------
+;; -nosplash Don't display a splash screen on startup.
+;; --nosplash
+;; -------------------------
;; -u USER Load USER's init file instead of the init
;; -user USER file belonging to the user starting Emacs.
;; --user USER
@@ -136,6 +139,8 @@ with the contents of the startup message."
:type 'boolean
:group 'initialization)
+(defvaralias 'inhibit-splash-screen 'inhibit-startup-message)
+
(defcustom inhibit-startup-echo-area-message nil
"*Non-nil inhibits the initial startup echo area message.
Setting this variable takes effect
@@ -753,20 +758,20 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
(argi (pop args))
(argval nil))
;; Handle --OPTION=VALUE format.
- (if (and (string-match "\\`--" argi)
- (string-match "=" argi))
- (setq argval (substring argi (match-end 0))
- argi (substring argi 0 (match-beginning 0))))
- (or (equal argi "--")
- (let ((completion (try-completion argi longopts)))
- (if (eq completion t)
- (setq argi (substring argi 1))
- (if (stringp completion)
- (let ((elt (assoc completion longopts)))
- (or elt
- (error "Option `%s' is ambiguous" argi))
- (setq argi (substring (car elt) 1)))
- (setq argval nil)))))
+ (when (and (string-match "\\`--" argi)
+ (string-match "=" argi))
+ (setq argval (substring argi (match-end 0))
+ argi (substring argi 0 (match-beginning 0))))
+ (unless (equal argi "--")
+ (let ((completion (try-completion argi longopts)))
+ (if (eq completion t)
+ (setq argi (substring argi 1))
+ (if (stringp completion)
+ (let ((elt (assoc completion longopts)))
+ (or elt
+ (error "Option `%s' is ambiguous" argi))
+ (setq argi (substring (car elt) 1)))
+ (setq argval nil)))))
(cond
((member argi '("-q" "-no-init-file"))
(setq init-file-user nil))
@@ -1503,7 +1508,7 @@ normal otherwise."
;; and long versions of what's on command-switch-alist.
(longopts
(append '(("--funcall") ("--load") ("--insert") ("--kill")
- ("--directory") ("--eval") ("--execute")
+ ("--directory") ("--eval") ("--execute") ("--nosplash")
("--find-file") ("--visit") ("--file"))
(mapcar (lambda (elt)
(list (concat "-" (car elt))))
@@ -1556,6 +1561,9 @@ normal otherwise."
(funcall (cdr tem) argi))
(funcall (cdr tem) argi)))
+ ((string-equal argi "-nosplash")
+ (setq inhibit-startup-message t))
+
((member argi '("-f" ;what the manual claims
"-funcall"
"-e")) ; what the source used to say