changeset 92267:467f32569332

(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>.
author Juanma Barranquero <lekktu@gmail.com>
date Wed, 27 Feb 2008 16:39:09 +0000
parents f32eae6092fa
children db8756d7fa4b
files lisp/uniquify.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/uniquify.el	Wed Feb 27 15:09:04 2008 +0000
+++ b/lisp/uniquify.el	Wed Feb 27 16:39:09 2008 +0000
@@ -194,9 +194,11 @@
 ;; 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.