From: Lars Hansen Date: Mon, 18 Apr 2005 18:27:39 +0000 (+0000) Subject: Make "--no-desktop" turn off `desktop-save-mode'. X-Git-Tag: ttn-vms-21-2-B4~916 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4b217d4608d3609ad5d36ba1df487aecda6dc686;p=emacs.git Make "--no-desktop" turn off `desktop-save-mode'. --- diff --git a/lisp/desktop.el b/lisp/desktop.el index ed663d375d5..8e81e8826fe 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1030,9 +1030,10 @@ If there are no buffers left to create, kill the timer." 'after-init-hook '(lambda () (let ((key "--no-desktop")) - (if (member key command-line-args) - (delete key command-line-args) - (when desktop-save-mode (desktop-read)))))) + (when (member key command-line-args) + (setq command-line-args (delete key command-line-args)) + (setq desktop-save-mode nil))) + (when desktop-save-mode (desktop-read)))) (provide 'desktop)