From ef63ea1c7a7ddd50ad9818367826340098dd6547 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 12 Oct 2007 19:36:28 +0000 Subject: [PATCH] (diff-current-defun): Force recomputation of change-log-default-name. --- lisp/ChangeLog | 15 +++++++++------ lisp/diff-mode.el | 4 ++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fb4d73ecf6..bd796c99f4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-10-12 Stefan Monnier + + * diff-mode.el (diff-current-defun): Force recomputation of + change-log-default-name. + 2007-10-12 Chong Yidong * startup.el (fancy-startup-screen): Remove an unnecessary newline @@ -54,10 +59,9 @@ 2007-10-11 Eric S. Raymond - * vc.el (vc-diff): - (vc-diff-internal): Bug fixes by Juanma Barranquero. Temporarily - disable the check for his edge case, it's calling some brittle - code. + * vc.el (vc-diff, vc-diff-internal): Bug fixes by Juanma Barranquero. + Temporarily disable the check for his edge case, it's calling some + brittle code. (with-vc-properties): Fievaluation time of a macro argument. * ediff-vers.el (ediff-vc-internal): @@ -193,8 +197,7 @@ * vc-mtn.el: * vc-rcs.el: * vc-sccs.el: - * vc-svn.el: Terminology cleanup: workfile-version -> - working-revision, + * vc-svn.el: Terminology cleanup: workfile-version -> working-revision, {find,init,next,previous,annotate-*,log}-version -> {find,init,next,previous,annotate-*,log}-revision, annotate-focus-version -> annotate-working-revision, The term diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 609c5ef649..229ef22777 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) -- 2.39.2