Commit 452e9090 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(command-line): Complain about unknown options.

(command-line): Handle = in option only if starts with --.

(user-mail-address): Doc fix.
parent 2b3a206d
...@@ -223,7 +223,9 @@ specified by the LC_ALL, LC_CTYPE and LANG environment variables.") ...@@ -223,7 +223,9 @@ specified by the LC_ALL, LC_CTYPE and LANG environment variables.")
"*Name of this machine, for purposes of naming users.") "*Name of this machine, for purposes of naming users.")
(defvar user-mail-address nil (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-" (defvar auto-save-list-file-prefix "~/.saves-"
"Prefix for generating auto-save-list-file-name. "Prefix for generating auto-save-list-file-name.
...@@ -401,7 +403,9 @@ this prefix to create a unique file name.") ...@@ -401,7 +403,9 @@ this prefix to create a unique file name.")
("--debug-init") ("--iconic") ("--icon-type"))) ("--debug-init") ("--iconic") ("--icon-type")))
(argi (car args)) (argi (car args))
(argval nil)) (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)) (setq argval (substring argi (match-end 0))
argi (substring argi 0 (match-beginning 0)))) argi (substring argi 0 (match-beginning 0))))
(let ((completion (try-completion argi longopts))) (let ((completion (try-completion argi longopts)))
...@@ -442,6 +446,8 @@ this prefix to create a unique file name.") ...@@ -442,6 +446,8 @@ this prefix to create a unique file name.")
(setq default-frame-alist (setq default-frame-alist
(cons '(icon-type . t) default-frame-alist)) (cons '(icon-type . t) default-frame-alist))
(setq args (cdr args))) (setq args (cdr args)))
((and (not (equal "" argi)) (aref argi 0))
(error "Unknown option `%s'" argi))
(t (setq done t))) (t (setq done t)))
;; Was argval set but not used? ;; Was argval set but not used?
(and argval (and argval
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment