]> git.eshelyaron.com Git - emacs.git/commitdiff
(uniquify-buffer-base-name): If the base name is an empty
authorJuanma Barranquero <lekktu@gmail.com>
Wed, 27 Feb 2008 16:39:45 +0000 (16:39 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Wed, 27 Feb 2008 16:39:45 +0000 (16:39 +0000)
string, return nil to allow the caller to default to the
buffer name.  Reported by Martin Fischer <parozusa@web.de>.

lisp/ChangeLog
lisp/uniquify.el

index 30600317a79899524e56a8b966b34e9862f6ca3e..1c01d788275fb946af970a187522bed9cbf483f0 100644 (file)
@@ -1,5 +1,9 @@
 2008-02-27  Juanma Barranquero  <lekktu@gmail.com>
 
+       * uniquify.el (uniquify-buffer-base-name): If the base name is an
+       empty string, return nil to allow the caller to default to the
+       buffer name.  Reported by Martin Fischer <parozusa@web.de>.
+
        * tool-bar.el (tool-bar-setup): Doc fix.
 
        * mail/supercite.el (sc-describe):
index 802f18c37539651d3effeb4bad5f6480c776b30f..c316a47fbf81a08d5e9412386f65c572ebd286c7 100644 (file)
@@ -194,9 +194,11 @@ It actually holds the list of `uniquify-item's corresponding to the conflict.")
 ;; Used in desktop.el to save the non-uniquified buffer name
 (defun uniquify-buffer-base-name ()
   "Return the base name of the current buffer.
-Return nil if the buffer is not managed by uniquify."
+Return nil if the buffer is not managed by uniquify,
+or if the base name is empty."
   (and uniquify-managed
-       (uniquify-item-base (car uniquify-managed))))
+       (let ((base (uniquify-item-base (car uniquify-managed))))
+        (if (string= base "") nil base))))
 
 ;;; Main entry point.