From 07e4bb9a3092874df2e8c49ab4f92219525aaac1 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 27 Feb 2008 16:39:45 +0000 Subject: [PATCH] (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 . --- lisp/ChangeLog | 4 ++++ lisp/uniquify.el | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 30600317a79..1c01d788275 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2008-02-27 Juanma Barranquero + * 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 . + * tool-bar.el (tool-bar-setup): Doc fix. * mail/supercite.el (sc-describe): diff --git a/lisp/uniquify.el b/lisp/uniquify.el index 802f18c3753..c316a47fbf8 100644 --- a/lisp/uniquify.el +++ b/lisp/uniquify.el @@ -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. -- 2.39.5