diff options
| author | Juanma Barranquero | 2008-02-12 14:32:56 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-02-12 14:32:56 +0000 |
| commit | c91db6f12d39ea9b4abeffcebf185b1779562187 (patch) | |
| tree | 2af90caf775d270cbb343e980bb853acb63b8db8 | |
| parent | a74722ee04df987ac828b4c795622287df3ab3af (diff) | |
| download | emacs-c91db6f12d39ea9b4abeffcebf185b1779562187.tar.gz emacs-c91db6f12d39ea9b4abeffcebf185b1779562187.zip | |
(uniquify-buffer-base-name): New function.
Suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
| -rw-r--r-- | lisp/uniquify.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/uniquify.el b/lisp/uniquify.el index 02f598ae9fc..b2167f48656 100644 --- a/lisp/uniquify.el +++ b/lisp/uniquify.el | |||
| @@ -189,6 +189,13 @@ It actually holds the list of `uniquify-item's corresponding to the conflict.") | |||
| 189 | (make-variable-buffer-local 'uniquify-managed) | 189 | (make-variable-buffer-local 'uniquify-managed) |
| 190 | (put 'uniquify-managed 'permanent-local t) | 190 | (put 'uniquify-managed 'permanent-local t) |
| 191 | 191 | ||
| 192 | ;; Used in desktop.el to save the non-uniquified buffer name | ||
| 193 | (defun uniquify-buffer-base-name () | ||
| 194 | "Return the base name of the current buffer. | ||
| 195 | Return nil if the buffer is not managed by uniquify." | ||
| 196 | (and uniquify-managed | ||
| 197 | (uniquify-item-base (car uniquify-managed)))) | ||
| 198 | |||
| 192 | ;;; Main entry point. | 199 | ;;; Main entry point. |
| 193 | 200 | ||
| 194 | (defun uniquify-rationalize-file-buffer-names (base dirname newbuf) | 201 | (defun uniquify-rationalize-file-buffer-names (base dirname newbuf) |
| @@ -489,7 +496,7 @@ For use on `kill-buffer-hook'." | |||
| 489 | (dolist (buf buffers) | 496 | (dolist (buf buffers) |
| 490 | (set-buffer (car buf)) | 497 | (set-buffer (car buf)) |
| 491 | (rename-buffer (cdr buf) t)))) | 498 | (rename-buffer (cdr buf) t)))) |
| 492 | ;; continue standard uploading | 499 | ;; continue standard unloading |
| 493 | nil) | 500 | nil) |
| 494 | 501 | ||
| 495 | (provide 'uniquify) | 502 | (provide 'uniquify) |