From: Richard M. Stallman Date: Fri, 10 Nov 1995 17:27:52 +0000 (+0000) Subject: (command-line): Complain about unknown options. X-Git-Tag: emacs-19.34~2381 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=452e90900aca6247493d1a5c8a63fa330d5df81a;p=emacs.git (command-line): Complain about unknown options. (command-line): Handle = in option only if starts with --. (user-mail-address): Doc fix. --- 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