diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2002-06-27 15:35:48 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2002-06-27 15:35:48 +0000 |
commit | 3a53d4144c5a12e6e88dd5dbcc9283e137d2c857 (patch) | |
tree | 21f171ab22540884b9c971a8103923781f8f6a9e /lisp/uniquify.el | |
parent | 47563dc40268bf6f9e3232045e0d2d55e5f0a160 (diff) | |
download | emacs-3a53d4144c5a12e6e88dd5dbcc9283e137d2c857.tar.gz |
(uniquify-delay-rationalize-file-buffer-names):
Rename from delay-uniquify-rationalize-file-buffer-names.
Only rationalize if the buffer is under uniquify control.
(uniquify-delayed-rationalize-file-buffer-names):
Rename from delayed-uniquify-rationalize-file-buffer-names.
Diffstat (limited to 'lisp/uniquify.el')
-rw-r--r-- | lisp/uniquify.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/uniquify.el b/lisp/uniquify.el index 448ce6f4744..88f513de32c 100644 --- a/lisp/uniquify.el +++ b/lisp/uniquify.el @@ -385,21 +385,23 @@ in `uniquify-list-buffers-directory-modes', otherwise returns nil." ;; (This ought to set some global variables so the work is done only for ;; buffers with names similar to the deleted buffer. -MDE) -(defun delay-uniquify-rationalize-file-buffer-names () +(defun uniquify-delay-rationalize-file-buffer-names () "Add `delayed-uniquify-rationalize-file-buffer-names' to `post-command-hook'. For use on, eg, `kill-buffer-hook', to rationalize *after* buffer deletion." (if (and uniquify-buffer-name-style - uniquify-after-kill-buffer-p) + uniquify-after-kill-buffer-p + ;; Rationalizing is costly, so don't do it for temp buffers. + (uniquify-buffer-file-name (current-buffer))) (add-hook 'post-command-hook - 'delayed-uniquify-rationalize-file-buffer-names))) + 'uniquify-delayed-rationalize-file-buffer-names))) -(defun delayed-uniquify-rationalize-file-buffer-names () +(defun uniquify-delayed-rationalize-file-buffer-names () "Rerationalize buffer names and remove self from `post-command-hook'. See also `delay-rationalize-file-buffer-names' for hook setter." (uniquify-rationalize-file-buffer-names) (remove-hook 'post-command-hook - 'delayed-uniquify-rationalize-file-buffer-names)) + 'uniquify-delayed-rationalize-file-buffer-names)) -(add-hook 'kill-buffer-hook 'delay-uniquify-rationalize-file-buffer-names) +(add-hook 'kill-buffer-hook 'uniquify-delay-rationalize-file-buffer-names) ;;; uniquify.el ends here |