# HG changeset patch # User Eli Zaretskii # Date 1137835933 0 # Node ID 667bc63867419b6655ff9cc015cf7d51f516fc84 # Parent 28cb719689fe2339a6f26db90dec0e9aae2be765 (command-line-1): Handle --no-desktop if desktop.el is not loaded. diff -r 28cb719689fe -r 667bc6386741 lisp/startup.el --- a/lisp/startup.el Sat Jan 21 04:52:06 2006 +0000 +++ b/lisp/startup.el Sat Jan 21 09:32:13 2006 +0000 @@ -1628,7 +1628,7 @@ (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 @@ ((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)))