changeset 80109:0867191fcef1

(uniquify-buffer-base-name): New function. Suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 12 Feb 2008 14:32:56 +0000
parents d616730de510
children b2a178c5133e
files lisp/uniquify.el
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/uniquify.el	Mon Feb 11 15:43:56 2008 +0000
+++ b/lisp/uniquify.el	Tue Feb 12 14:32:56 2008 +0000
@@ -189,6 +189,13 @@
 (make-variable-buffer-local 'uniquify-managed)
 (put 'uniquify-managed 'permanent-local t)
 
+;; 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."
+  (and uniquify-managed
+       (uniquify-item-base (car uniquify-managed))))
+
 ;;; Main entry point.
 
 (defun uniquify-rationalize-file-buffer-names (base dirname newbuf)
@@ -489,7 +496,7 @@
       (dolist (buf buffers)
 	(set-buffer (car buf))
 	(rename-buffer (cdr buf) t))))
-  ;; continue standard uploading
+  ;; continue standard unloading
   nil)
 
 (provide 'uniquify)