Mercurial > emacs
comparison lisp/startup.el @ 45530:19a685f604ee
(command-line): Use `when', `unless'.
(command-line-1): New argument "--nosplash". Handle it.
(inhibit-splash-screen): New variable alias for
`inhibit-startup-message'.
author | Colin Walters <walters@gnu.org> |
---|---|
date | Sun, 26 May 2002 20:49:28 +0000 |
parents | f5af14e5f5a3 |
children | 6d0025248c2b |
comparison
equal
deleted
inserted
replaced
45529:45014630aeb2 | 45530:19a685f604ee |
---|---|
67 ;; -no-init-file "default.el". Regardless of this switch, | 67 ;; -no-init-file "default.el". Regardless of this switch, |
68 ;; --no-init-file "site-start" is still loaded. | 68 ;; --no-init-file "site-start" is still loaded. |
69 ;; ------------------------- | 69 ;; ------------------------- |
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 ;; ------------------------- | |
73 ;; -nosplash Don't display a splash screen on startup. | |
74 ;; --nosplash | |
72 ;; ------------------------- | 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 |
76 ;; ------------------------- | 79 ;; ------------------------- |
133 "*Non-nil inhibits the initial startup message. | 136 "*Non-nil inhibits the initial startup message. |
134 This is for use in your personal init file, once you are familiar | 137 This is for use in your personal init file, once you are familiar |
135 with the contents of the startup message." | 138 with the contents of the startup message." |
136 :type 'boolean | 139 :type 'boolean |
137 :group 'initialization) | 140 :group 'initialization) |
141 | |
142 (defvaralias 'inhibit-splash-screen 'inhibit-startup-message) | |
138 | 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. |
141 Setting this variable takes effect | 146 Setting this variable takes effect |
142 only if you do it with the customization buffer | 147 only if you do it with the customization buffer |
751 (let ((longopts '(("--no-init-file") ("--no-site-file") ("--user") | 756 (let ((longopts '(("--no-init-file") ("--no-site-file") ("--user") |
752 ("--debug-init") ("--iconic") ("--icon-type"))) | 757 ("--debug-init") ("--iconic") ("--icon-type"))) |
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)) |
773 ((member argi '("-u" "-user")) | 778 ((member argi '("-u" "-user")) |
774 (or argval | 779 (or argval |
1501 just-files ;; t if this follows the magic -- option. | 1506 just-files ;; t if this follows the magic -- option. |
1502 ;; This includes our standard options' long versions | 1507 ;; This includes our standard options' long versions |
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)))) |
1510 command-switch-alist))) | 1515 command-switch-alist))) |
1511 (line 0) | 1516 (line 0) |
1553 (if argval | 1558 (if argval |
1554 (let ((command-line-args-left | 1559 (let ((command-line-args-left |
1555 (cons argval command-line-args-left))) | 1560 (cons argval command-line-args-left))) |
1556 (funcall (cdr tem) argi)) | 1561 (funcall (cdr tem) argi)) |
1557 (funcall (cdr tem) argi))) | 1562 (funcall (cdr tem) argi))) |
1563 | |
1564 ((string-equal argi "-nosplash") | |
1565 (setq inhibit-startup-message t)) | |
1558 | 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 |
1562 (if argval | 1570 (if argval |