* keyboard.c (parse_tool_bar_item): For QClabel, set TOOL_BAR_ITEM_LABEL not HELP.
[bpt/emacs.git] / lisp / desktop.el
index 0e6153c..b4d3dfd 100644 (file)
@@ -226,7 +226,7 @@ the normal hook `desktop-not-loaded-hook' is run."
 The base name of the file is specified in `desktop-base-file-name'."
   :type '(repeat directory)
   :group 'desktop
-  :version "22.1")
+  :version "23.2")                      ; user-emacs-directory added
 
 (defcustom desktop-missing-file-warning nil
   "If non-nil, offer to recreate the buffer of a deleted file.
@@ -303,10 +303,12 @@ to the value obtained by evaluating FORM."
   :version "22.1")
 
 (defcustom desktop-clear-preserve-buffers
-  '("\\*scratch\\*" "\\*Messages\\*" "\\*server\\*" "\\*tramp/.+\\*")
+  '("\\*scratch\\*" "\\*Messages\\*" "\\*server\\*" "\\*tramp/.+\\*"
+    "\\*Warnings\\*")
   "List of buffers that `desktop-clear' should not delete.
 Each element is a regular expression.  Buffers with a name matched by any of
 these won't be deleted."
+  :version "23.3"                       ; added Warnings - bug#6336
   :type '(repeat string)
   :group 'desktop)
 
@@ -620,7 +622,10 @@ is nil, ask the user where to save the desktop."
   (when (and desktop-save-mode
              (let ((exists (file-exists-p (desktop-full-file-name))))
                (or (eq desktop-save t)
-                   (and exists (memq desktop-save '(ask-if-new if-exists)))
+                   (and exists (eq desktop-save 'if-exists))
+                  ;; If it exists, but we aren't using it, we are going
+                  ;; to ask for a new directory below.
+                   (and exists desktop-dirname (eq desktop-save 'ask-if-new))
                    (and
                     (or (memq desktop-save '(ask ask-if-new))
                         (and exists (eq desktop-save 'ask-if-exists)))