From: Eli Zaretskii Date: Sat, 21 Jan 2006 09:32:52 +0000 (+0000) Subject: (command-line-1): Handle --no-desktop if desktop.el is not loaded. X-Git-Tag: emacs-pretest-22.0.90~4653 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6ff901c753a11e45d5fbd70cd35ed10746bfafcd;p=emacs.git (command-line-1): Handle --no-desktop if desktop.el is not loaded. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d8beecfd4a0..54af57feb0f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-01-21 Eli Zaretskii + + * startup.el (command-line-1): Handle --no-desktop if desktop.el + is not loaded. + 2006-01-20 Jay Belanger * calc/calcalg2.el (calc-sum-rec): Fix the sum when the lower diff --git a/lisp/startup.el b/lisp/startup.el index bc00dc36ba6..4db086fa7a7 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1628,7 +1628,7 @@ normal otherwise." (longopts (append '(("--funcall") ("--load") ("--insert") ("--kill") ("--directory") ("--eval") ("--execute") ("--no-splash") - ("--find-file") ("--visit") ("--file")) + ("--find-file") ("--visit") ("--file") ("--no-desktop")) (mapcar (lambda (elt) (list (concat "-" (car elt)))) command-switch-alist))) @@ -1728,6 +1728,13 @@ normal otherwise." ((equal argi "-kill") (kill-emacs t)) + ;; This is for when they use --no-desktop with -q, or + ;; don't load Desktop in their .emacs. If desktop.el + ;; _is_ loaded, it will handle this switch, and we + ;; won't see it by the time we get here. + ((equal argi "-no-desktop") + (message "\"--no-desktop\" ignored because the Desktop package is not loaded")) + ((string-match "^\\+[0-9]+\\'" argi) (setq line (string-to-number argi)))