emacs-bug-tracker
[Top][All Lists]
Advanced

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

[Emacs-bug-tracker] bug#7284: closed ([PATCH] `find-change-log' fails in


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#7284: closed ([PATCH] `find-change-log' fails in *derived* Diff modes)
Date: Wed, 27 Oct 2010 21:41:02 +0000

Your message dated Wed, 27 Oct 2010 17:38:46 -0400
with message-id <address@hidden>
and subject line Re: bug#7284: [PATCH] `find-change-log' fails in *derived* 
Diff modes
has caused the GNU bug report #7284,
regarding [PATCH] `find-change-log' fails in *derived* Diff modes
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
7284: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7284
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] `find-change-log' fails in *derived* Diff modes Date: Tue, 26 Oct 2010 15:47:43 -0400
Running `C-x 4 a' (add-change-log-entry-other-window) in a derived mode
of Diff mode (psvn-diff-mode, magit-diff-mode, and so on) does not open
the correct ChangeLog file.  The following patch fixes the problem.

--- lisp/vc/add-log.el~ 2010-09-21 14:11:28.216630100 -0400
+++ lisp/vc/add-log.el  2010-10-25 16:46:49.808297800 -0400
@@ -701,7 +701,7 @@
 Optional arg BUFFER-FILE overrides `buffer-file-name'."
   ;; If we are called from a diff, first switch to the source buffer;
   ;; in order to respect buffer-local settings of change-log-default-name, etc.
-  (with-current-buffer (let ((buff (if (eq major-mode 'diff-mode)
+  (with-current-buffer (let ((buff (if (derived-mode-p 'diff-mode)
                                       (car (ignore-errors
                                             (diff-find-source-location))))))
                         (if (buffer-live-p buff) buff



Perhaps, more of the cases of Emacs's Lisp that have (eq major-mode ...)
should be converted to (derived-mode-p ...).  Obviously, they'll need
to be studied on a case-by-case basis since there might be cases when
only the exact major-mode is intended to be matched.

Thanks for Emacs,
/a

Attachment: add-log_derived-diff-mode.patch
Description: Binary data


--- End Message ---
--- Begin Message --- Subject: Re: bug#7284: [PATCH] `find-change-log' fails in *derived* Diff modes Date: Wed, 27 Oct 2010 17:38:46 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
> -  (with-current-buffer (let ((buff (if (eq major-mode 'diff-mode)
> +  (with-current-buffer (let ((buff (if (derived-mode-p 'diff-mode)

Installed in the emacs-23 branch, thank you,


        Stefan


--- End Message ---

reply via email to

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