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

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

[debbugs-tracker] bug#11319: closed ([PATCH 1/2] BUGFIX: select current-


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#11319: closed ([PATCH 1/2] BUGFIX: select current-diff-comparison regions for ediff-inferior-compare-regions correctly)
Date: Fri, 14 Dec 2012 15:25:02 +0000

Your message dated Fri, 14 Dec 2012 10:23:53 -0500
with message-id <address@hidden>
and subject line Re: bug#11319: [PATCH 1/2] BUGFIX: select 
current-diff-comparison regions for ediff-inferior-compare-regions correctly
has caused the debbugs.gnu.org bug report #11319,
regarding [PATCH 1/2] BUGFIX: select current-diff-comparison regions for 
ediff-inferior-compare-regions correctly
to be marked as done.

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


-- 
11319: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11319
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH 1/2] BUGFIX: select current-diff-comparison regions for ediff-inferior-compare-regions correctly Date: Mon, 23 Apr 2012 15:28:25 -0400
The buffer types passed to
ediff-clone-buffer-for-current-diff-comparison are used to select the
character ranges that participate in the inferior comparison.  Those
were being hardcoded as 'A and 'B, which was wrong.
---
 lisp/vc/ediff-util.el |   20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index 78a2163..046070d 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -3378,10 +3378,18 @@ Without an argument, it saves customized diff argument, 
if available
     (set-window-buffer wind cloned-buff)
     cloned-buff))
 
-(defun ediff-clone-buffer-for-current-diff-comparison (buff buf-type reg-name)
-  (let ((cloned-buff (ediff-make-cloned-buffer buff reg-name))
-       (reg-start (ediff-get-diff-posn buf-type 'beg))
-       (reg-end (ediff-get-diff-posn buf-type 'end)))
+(defun ediff-buffer-type (buffer)
+  (cond ((eq buffer ediff-buffer-A) 'A)
+        ((eq buffer ediff-buffer-B) 'B)
+        ((eq buffer ediff-buffer-C) 'C)
+        ((eq buffer ediff-ancestor-buffer) 'Ancestor)
+        (t nil)))
+
+(defun ediff-clone-buffer-for-current-diff-comparison (buff reg-name)
+  (let* ((cloned-buff (ediff-make-cloned-buffer buff reg-name))
+         (buf-type (ediff-buffer-type buff))
+         (reg-start (ediff-get-diff-posn buf-type 'beg))
+         (reg-end (ediff-get-diff-posn buf-type 'end)))
     (ediff-with-current-buffer cloned-buff
       ;; set region to be the current diff region
       (goto-char reg-start)
@@ -3555,7 +3563,7 @@ Ediff Control Panel to restore highlighting."
 
     (setq bufA (if use-current-diff-p
                   (ediff-clone-buffer-for-current-diff-comparison
-                   bufA 'A "-Region.A-")
+                   bufA "-Region.A-")
                 (ediff-clone-buffer-for-region-comparison bufA "-Region.A-")))
     (ediff-with-current-buffer bufA
       (setq begA (region-beginning)
@@ -3570,7 +3578,7 @@ Ediff Control Panel to restore highlighting."
 
     (setq bufB (if use-current-diff-p
                   (ediff-clone-buffer-for-current-diff-comparison
-                   bufB 'B "-Region.B-")
+                   bufB "-Region.B-")
                 (ediff-clone-buffer-for-region-comparison bufB "-Region.B-")))
     (ediff-with-current-buffer bufB
       (setq begB (region-beginning)
-- 
1.7.10




--- End Message ---
--- Begin Message --- Subject: Re: bug#11319: [PATCH 1/2] BUGFIX: select current-diff-comparison regions for ediff-inferior-compare-regions correctly Date: Fri, 14 Dec 2012 10:23:53 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
Version: 24.4

> The buffer types passed to
> ediff-clone-buffer-for-current-diff-comparison are used to select the
> character ranges that participate in the inferior comparison.  Those
> were being hardcoded as 'A and 'B, which was wrong.

Thank you, it looks OK, so I installed it in trunk,


        Stefan


--- End Message ---

reply via email to

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