changeset 13479:983cfcaf1fbd

(command-line): Complain about unknown options. (command-line): Handle = in option only if starts with --. (user-mail-address): Doc fix.
author Richard M. Stallman <rms@gnu.org>
date Fri, 10 Nov 1995 17:27:52 +0000
parents 391ce1139d50
children edc4a329403e
files lisp/startup.el
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/startup.el	Fri Nov 10 17:23:49 1995 +0000
+++ b/lisp/startup.el	Fri Nov 10 17:27:52 1995 +0000
@@ -223,7 +223,9 @@
   "*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 @@
 			("--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 @@
 	  (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