From: Juanma Barranquero Date: Fri, 29 Feb 2008 02:59:43 +0000 (+0000) Subject: (desktop-save): Save the buffer name if the uniquified base name is empty. X-Git-Tag: emacs-pretest-22.1.92~40 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=67aa22cb2b64e3727070aa749b9199bce1218127;p=emacs.git (desktop-save): Save the buffer name if the uniquified base name is empty. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 438e2b5f52a..eb80e96e331 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-02-29 Juanma Barranquero + + * desktop.el (desktop-save): Save the buffer name if the + uniquified base name is empty. + 2008-02-29 Stefan Monnier * diff-mode.el (diff-sanity-check-hunk): Only accept an empty line if @@ -6,7 +11,7 @@ 2008-02-28 Juri Linkov * startup.el (normal-splash-screen): Add argument `concise'. - Remove unused binding `prev-buffer'. Let-bind `splash-buffer' + Remove unused binding `prev-buffer'. Let-bind `splash-buffer' to the created buffer. If `concise' is non-nil, call `display-buffer', otherwise `switch-to-buffer'. Doc fix. (display-startup-screen): Add argument `concise' to the call to diff --git a/lisp/desktop.el b/lisp/desktop.el index 8be86571f13..fbf9ed5c044 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -895,8 +895,9 @@ See also `desktop-base-file-name'." "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"))))