aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong2010-01-16 14:28:59 -0500
committerChong Yidong2010-01-16 14:28:59 -0500
commit4fe22cdf59bec57eb4c4ca0264009d6b2e956707 (patch)
treebb2202054c22de0cc98432931d25d3bdb49369a8 /lisp
parentf5700c5e7e4f0b5b4d3a1d187328e9e8078ef22d (diff)
downloademacs-4fe22cdf59bec57eb4c4ca0264009d6b2e956707.tar.gz
emacs-4fe22cdf59bec57eb4c4ca0264009d6b2e956707.zip
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')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/startup.el13
2 files changed, 15 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ea7435c559d..f62626272b2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12010-01-16 Chong Yidong <cyd@stupidchicken.com>
2
3 * startup.el (command-line): Remove unused --icon-type arg.
4 Handle --display arg, passing it to command-line-1 (Bug#5392).
5
12010-01-16 Mario Lang <mlang@delysid.org> 62010-01-16 Mario Lang <mlang@delysid.org>
2 7
3 * cedet/ede/cpp-root.el (ede-cpp-root-project): 8 * cedet/ede/cpp-root.el (ede-cpp-root-project):
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).")
758 (pop args))) 758 (pop args)))
759 759
760 (let ((done nil) 760 (let ((done nil)
761 (args (cdr command-line-args))) 761 (args (cdr command-line-args))
762 display-arg)
762 763
763 ;; Figure out which user's init file to load, 764 ;; Figure out which user's init file to load,
764 ;; either from the environment or from the options. 765 ;; 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).")
794 (setq argval nil 795 (setq argval nil
795 argi orig-argi))))) 796 argi orig-argi)))))
796 (cond 797 (cond
798 ;; The --display arg is handled partly in C, partly in Lisp.
799 ;; When it shows up here, we just put it back to be handled
800 ;; by `command-line-1'.
801 ((member argi '("-d" "-display"))
802 (setq display-arg (list argi (pop args))))
797 ((member argi '("-Q" "-quick")) 803 ((member argi '("-Q" "-quick"))
798 (setq init-file-user nil 804 (setq init-file-user nil
799 site-run-file nil 805 site-run-file nil
@@ -813,8 +819,6 @@ opening the first frame (e.g. open a connection to an X server).")
813 (setq init-file-debug t)) 819 (setq init-file-debug t))
814 ((equal argi "-iconic") 820 ((equal argi "-iconic")
815 (push '(visibility . icon) initial-frame-alist)) 821 (push '(visibility . icon) initial-frame-alist))
816 ((member argi '("-icon-type" "-i" "-itype"))
817 (push '(icon-type . t) default-frame-alist))
818 ((member argi '("-nbc" "-no-blinking-cursor")) 822 ((member argi '("-nbc" "-no-blinking-cursor"))
819 (setq no-blinking-cursor t)) 823 (setq no-blinking-cursor t))
820 ;; Push the popped arg back on the list of arguments. 824 ;; 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).")
825 (and argval 829 (and argval
826 (error "Option `%s' doesn't allow an argument" argi)))) 830 (error "Option `%s' doesn't allow an argument" argi))))
827 831
832 ;; Re-attach the --display arg.
833 (and display-arg (setq args (append display-arg args)))
834
828 ;; Re-attach the program name to the front of the arg list. 835 ;; Re-attach the program name to the front of the arg list.
829 (and command-line-args 836 (and command-line-args
830 (setcdr command-line-args args))) 837 (setcdr command-line-args args)))