summaryrefslogtreecommitdiff
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2007-10-12 19:36:28 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2007-10-12 19:36:28 +0000
commitef63ea1c7a7ddd50ad9818367826340098dd6547 (patch)
tree705364273fa1c4328e7932587db6ed014ce48777 /lisp/diff-mode.el
parent04ef26186e0b2161c0dbbb88125db7f9708c8e8d (diff)
downloademacs-ef63ea1c7a7ddd50ad9818367826340098dd6547.tar.gz
(diff-current-defun): Force recomputation of change-log-default-name.
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 609c5ef6490..229ef227777 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -1578,6 +1578,10 @@ then `diff-jump-to-old-file' is also set, for the next invocations."
(defun diff-current-defun ()
"Find the name of function at point.
For use in `add-log-current-defun-function'."
+ ;; Kill change-log-default-name so it gets recomputed each time, since
+ ;; each hunk may belong to another file which may belong to another
+ ;; directory and hence have a different ChangeLog file.
+ (kill-local-variable 'change-log-default-name)
(save-excursion
(when (looking-at diff-hunk-header-re)
(forward-line 1)