changeset 92328:04dddf68dfc0

(desktop-save): Save the buffer name if the uniquified base name is empty.
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 29 Feb 2008 03:02:25 +0000
parents a5d0f96b4c75
children 1e0c26c0d529
files lisp/desktop.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/desktop.el	Fri Feb 29 02:10:45 2008 +0000
+++ b/lisp/desktop.el	Fri Feb 29 03:02:25 2008 +0000
@@ -897,8 +897,9 @@
 			  "desktop-append-buffer-args")
 			" "
 			desktop-file-version)
-		;; If the base name is non-nil, we save it instead of the buffer name
-		(when base (setcar (nthcdr 1 l) base))
+		;; If there's a non-empty base name, we save it instead of the buffer name
+		(when (and base (not (string= base "")))
+		  (setcar (nthcdr 1 l) base))
 		(dolist (e l)
 		  (insert "\n  " (desktop-value-to-string e)))
 		(insert ")\n\n"))))