diff lisp/desktop.el @ 61638:ef63bf685348

Make "--no-desktop" turn off `desktop-save-mode'.
author Lars Hansen <larsh@soem.dk>
date Mon, 18 Apr 2005 18:27:39 +0000
parents 65075d5373df
children 6fb026ad601f e1fbb019c538
line wrap: on
line diff
--- a/lisp/desktop.el	Mon Apr 18 14:10:09 2005 +0000
+++ b/lisp/desktop.el	Mon Apr 18 18:27:39 2005 +0000
@@ -1030,9 +1030,10 @@
   '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)