summaryrefslogtreecommitdiff
path: root/lisp/uniquify.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-06-21 23:59:11 +0000
committerRichard M. Stallman <rms@gnu.org>1997-06-21 23:59:11 +0000
commit6cda39f71a20490ffac20e55e3ceb9fbf977ccd3 (patch)
tree66ca660765b3e6b4cf38b7d805eef95b1d6644ba /lisp/uniquify.el
parent7d26d78c694c6dc584fd99896dd8c3637f1d317f (diff)
downloademacs-6cda39f71a20490ffac20e55e3ceb9fbf977ccd3.tar.gz
(delay-uniquify-rationalize-file-buffer-names): Remove this hook here,
if we won't call delayed-uniquify-rationalize-file-buffer-names. (uniquify-buffer-name-style): Default value is nil.
Diffstat (limited to 'lisp/uniquify.el')
-rw-r--r--lisp/uniquify.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/uniquify.el b/lisp/uniquify.el
index 4366f8d7ab3..1eb2dfeb418 100644
--- a/lisp/uniquify.el
+++ b/lisp/uniquify.el
@@ -34,8 +34,9 @@
;; Makefile|zaphod, respectively (instead of Makefile and Makefile<2>).
;; Other buffer name styles are also available.
-;; To use this file, just load it; or add (require 'uniquify) to your .emacs.
-;; To disable it after loading, set variable uniquify-buffer-name-style to nil.
+;; To use this file, do (require 'uniquify)
+;; and set uniquify-buffer-name-style to one of its non-nil alternative values.
+
;; For other options, see "User-visible variables", below.
;; A version of uniquify.el that works under Emacs 18, Emacs 19, XEmacs,
@@ -89,7 +90,7 @@
:group 'applications)
-(defcustom uniquify-buffer-name-style 'post-forward
+(defcustom uniquify-buffer-name-style nil
"*If non-nil, buffer names are uniquified with parts of directory name.
The value determines the buffer name style and is one of `forward',
`reverse', `post-forward' (the default), or `post-forward-angle-brackets'.
@@ -104,7 +105,7 @@ would have the following buffer names in the various styles:
(const reverse)
(const post-forward)
(const podt-forward-angle-brackets)
- (const nil))
+ (const :tag "standard Emacs behavior (nil)" nil))
:group 'uniquify)
(defcustom uniquify-after-kill-buffer-p nil
@@ -412,7 +413,9 @@ For use on, eg, `kill-buffer-hook', to rationalize *after* buffer deletion."
(if (and uniquify-buffer-name-style
uniquify-after-kill-buffer-p)
(add-hook 'post-command-hook
- 'delayed-uniquify-rationalize-file-buffer-names)))
+ 'delayed-uniquify-rationalize-file-buffer-names)
+ (remove-hook 'kill-buffer-hook
+ 'delay-uniquify-rationalize-file-buffer-names)))
(defun delayed-uniquify-rationalize-file-buffer-names ()
"Rerationalize buffer names and remove self from `post-command-hook'.