From 4b217d4608d3609ad5d36ba1df487aecda6dc686 Mon Sep 17 00:00:00 2001 From: Lars Hansen Date: Mon, 18 Apr 2005 18:27:39 +0000 Subject: [PATCH] Make "--no-desktop" turn off `desktop-save-mode'. --- lisp/desktop.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) -- 2.39.2