Don't delete this function from kill-buffer-hook, if it is disabled.
(if (and uniquify-buffer-name-style
uniquify-after-kill-buffer-p)
(add-hook 'post-command-hook
- 'delayed-uniquify-rationalize-file-buffer-names)
- (remove-hook 'kill-buffer-hook
- 'delay-uniquify-rationalize-file-buffer-names)))
+ 'delayed-uniquify-rationalize-file-buffer-names)))
(defun delayed-uniquify-rationalize-file-buffer-names ()
"Rerationalize buffer names and remove self from `post-command-hook'.