changeset 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 c315470572e9
children c4472165ba35
files lisp/ChangeLog lisp/diff-mode.el
diffstat 2 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Oct 12 19:00:30 2007 +0000
+++ b/lisp/ChangeLog	Fri Oct 12 19:36:28 2007 +0000
@@ -1,3 +1,8 @@
+2007-10-12  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* diff-mode.el (diff-current-defun): Force recomputation of
+	change-log-default-name.
+
 2007-10-12  Chong Yidong  <cyd@stupidchicken.com>
 
 	* startup.el (fancy-startup-screen): Remove an unnecessary newline
@@ -54,10 +59,9 @@
 
 2007-10-11  Eric S. Raymond  <esr@snark.thyrsus.com>
 
-	* 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
--- 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)