summaryrefslogtreecommitdiff
path: root/lisp/startup.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-11-10 17:27:52 +0000
committerRichard M. Stallman <rms@gnu.org>1995-11-10 17:27:52 +0000
commit9eb21c1b58b121a2f91301048671cbfd3740f5bc (patch)
tree33b04585c32ed60e9f789c6e7c4abb7a17041610 /lisp/startup.el
parent7d900901d3ec109d5062ff4ecf453a9fa12f7b72 (diff)
downloademacs-9eb21c1b58b121a2f91301048671cbfd3740f5bc.tar.gz
(command-line): Complain about unknown options.
(command-line): Handle = in option only if starts with --. (user-mail-address): Doc fix.
Diffstat (limited to 'lisp/startup.el')
-rw-r--r--lisp/startup.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index c387b519d8e..398e97a465a 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -223,7 +223,9 @@ specified by the LC_ALL, LC_CTYPE and LANG environment variables.")
"*Name of this machine, for purposes of naming users.")
(defvar user-mail-address nil
- "*Full mailing address of this user.")
+ "*Full mailing address of this user.
+This is initialized based on `mail-host-address',
+after your init file is read, in case it sets `mail-host-address'.")
(defvar auto-save-list-file-prefix "~/.saves-"
"Prefix for generating auto-save-list-file-name.
@@ -401,7 +403,9 @@ this prefix to create a unique file name.")
("--debug-init") ("--iconic") ("--icon-type")))
(argi (car args))
(argval nil))
- (if (string-match "=" argi)
+ ;; 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))))
(let ((completion (try-completion argi longopts)))
@@ -442,6 +446,8 @@ this prefix to create a unique file name.")
(setq default-frame-alist
(cons '(icon-type . t) default-frame-alist))
(setq args (cdr args)))
+ ((and (not (equal "" argi)) (aref argi 0))
+ (error "Unknown option `%s'" argi))
(t (setq done t)))
;; Was argval set but not used?
(and argval