emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/uniquify.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/uniquify.el
Date: Fri, 31 Jan 2003 10:15:36 -0500

Index: emacs/lisp/uniquify.el
diff -c emacs/lisp/uniquify.el:1.39 emacs/lisp/uniquify.el:1.40
*** emacs/lisp/uniquify.el:1.39 Sun Oct 13 21:28:36 2002
--- emacs/lisp/uniquify.el      Fri Dec 13 14:52:35 2002
***************
*** 209,221 ****
                                 rawname bfn uniquify-min-dir-content)))
            (push (vector rawname bfn buffer proposed) fix-list)
          (push bufname uniquify-non-file-buffer-names))))
-     ;; Set up uniquify to re-rationalize after killing/renaming
-     ;; if there is a conflict.
-     (when (and uniquify-after-kill-buffer-p newbuffile (cdr fix-list))
-       (dolist (fix fix-list)
-       (with-current-buffer (uniquify-ref-buffer fix)
-         (add-hook 'kill-buffer-hook
-                   'uniquify-delay-rationalize-file-buffer-names nil t))))
      ;; selects buffers whose names may need changing, and others that
      ;; may conflict, then bring conflicting names together
      (uniquify-rationalize-a-list fix-list uniquify-min-dir-content)))
--- 209,214 ----
***************
*** 368,375 ****
           ;; UNIQUE argument
           (ad-get-arg 1))
        (progn
!       (if (memq 'uniquify-delay-rationalize-file-buffer-names
!                 kill-buffer-hook)
            ;; call with no argument; rationalize vs. old name as well as new
            (uniquify-rationalize-file-buffer-names)
          ;; call with argument: rationalize vs. new name only
--- 361,367 ----
           ;; UNIQUE argument
           (ad-get-arg 1))
        (progn
!       (if uniquify-after-kill-buffer-p
            ;; call with no argument; rationalize vs. old name as well as new
            (uniquify-rationalize-file-buffer-names)
          ;; call with argument: rationalize vs. new name only
***************
*** 397,403 ****
    "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)
        (add-hook 'post-command-hook
                'uniquify-delayed-rationalize-file-buffer-names)))
  
--- 389,397 ----
    "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
!          ;; Rationalizing is costly, so don't do it for temp buffers.
!          (uniquify-buffer-file-name (current-buffer)))
        (add-hook 'post-command-hook
                'uniquify-delayed-rationalize-file-buffer-names)))
  
***************
*** 407,411 ****
--- 401,407 ----
    (uniquify-rationalize-file-buffer-names)
    (remove-hook 'post-command-hook
               'uniquify-delayed-rationalize-file-buffer-names))
+ 
+ (add-hook 'kill-buffer-hook 'uniquify-delay-rationalize-file-buffer-names)
  
  ;;; uniquify.el ends here




reply via email to

[Prev in Thread] Current Thread [Next in Thread]