Mercurial > emacs
diff lisp/diff-mode.el @ 85208:8d5ae38b1b47
(diff-current-defun): Force recomputation of change-log-default-name.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Fri, 12 Oct 2007 19:36:28 +0000 |
| parents | 5039706521c9 |
| children | 782f0bc49c07 |
line wrap: on
line diff
--- a/lisp/diff-mode.el Fri Oct 12 19:00:30 2007 +0000 +++ b/lisp/diff-mode.el Fri Oct 12 19:36:28 2007 +0000 @@ -1578,6 +1578,10 @@ (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)
