diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-01-16 14:28:59 -0500 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-01-16 14:28:59 -0500 |
commit | 4fe22cdf59bec57eb4c4ca0264009d6b2e956707 (patch) | |
tree | bb2202054c22de0cc98432931d25d3bdb49369a8 /lisp/startup.el | |
parent | f5700c5e7e4f0b5b4d3a1d187328e9e8078ef22d (diff) | |
download | emacs-4fe22cdf59bec57eb4c4ca0264009d6b2e956707.tar.gz |
Command line arg processing fix (Bug#5392)
* src/emacs.c (standard_args): Adjust arg priorities to reflect how
they are processed in startup.el.
* lisp/startup.el (command-line): Remove unused --icon-type arg.
Handle --display arg, passing it to command-line-1 (Bug#5392).
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 9de08852ae2..857ad97e448 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -758,7 +758,8 @@ opening the first frame (e.g. open a connection to an X server).") (pop args))) (let ((done nil) - (args (cdr command-line-args))) + (args (cdr command-line-args)) + display-arg) ;; Figure out which user's init file to load, ;; either from the environment or from the options. @@ -794,6 +795,11 @@ opening the first frame (e.g. open a connection to an X server).") (setq argval nil argi orig-argi))))) (cond + ;; The --display arg is handled partly in C, partly in Lisp. + ;; When it shows up here, we just put it back to be handled + ;; by `command-line-1'. + ((member argi '("-d" "-display")) + (setq display-arg (list argi (pop args)))) ((member argi '("-Q" "-quick")) (setq init-file-user nil site-run-file nil @@ -813,8 +819,6 @@ opening the first frame (e.g. open a connection to an X server).") (setq init-file-debug t)) ((equal argi "-iconic") (push '(visibility . icon) initial-frame-alist)) - ((member argi '("-icon-type" "-i" "-itype")) - (push '(icon-type . t) default-frame-alist)) ((member argi '("-nbc" "-no-blinking-cursor")) (setq no-blinking-cursor t)) ;; Push the popped arg back on the list of arguments. @@ -825,6 +829,9 @@ opening the first frame (e.g. open a connection to an X server).") (and argval (error "Option `%s' doesn't allow an argument" argi)))) + ;; Re-attach the --display arg. + (and display-arg (setq args (append display-arg args))) + ;; Re-attach the program name to the front of the arg list. (and command-line-args (setcdr command-line-args args))) |