changeset 80247:c384fbc8c569

(desktop-save): Save the buffer name if the uniquified base name is empty.
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 29 Feb 2008 02:57:39 +0000
parents 3629f9a94638
children 1706c5c96359
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:40:10 2008 +0000
+++ b/lisp/desktop.el	Fri Feb 29 02:57:39 2008 +0000
@@ -895,8 +895,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"))))