Commit 665e5e07 authored by Dave Abrahams's avatar Dave Abrahams Committed by Stefan Monnier
Browse files

* lisp/vc/ediff-util.el (ediff-buffer-type): New function.

(ediff-clone-buffer-for-current-diff-comparison): Compute the buf-type
rather than taking it as as argument.
(ediff-inferior-compare-regions): Adjust calls accordingly.

Fixes: debbugs:11319
parent d72e9e92
2012-12-14 Dave Abrahams <dave@boostpro.com>
* vc/ediff-util.el (ediff-buffer-type): New function.
(ediff-clone-buffer-for-current-diff-comparison): Compute the buf-type
rather than taking it as as argument.
(ediff-inferior-compare-regions): Adjust calls accordingly (bug#11319).
2012-12-14 Ryan Crum <ryan.crum@eleostech.com>
 
* json.el: Add pretty-print option (bug#12634).
......
......@@ -324,7 +324,7 @@
(ert-run-tests-batch, ert--print-test-for-ewoc):
Handle `ert-test-quit'.
 
2011-03-03 David Abrahams <dave@boostpro.com> (tiny change)
2011-03-03 David Abrahams <dave@boostpro.com>
 
* vc/ediff-init.el (ediff-use-faces, ediff-highlight-all-diffs):
Move ediff-defvar-local calls after defcustoms. (Bug#1821)
......@@ -13597,7 +13597,7 @@
* textmodes/artist.el (artist-compute-popup-menu-table):
Remove duplicated words in doc-strings.
 
2010-01-15 David Abrahams <dave@boostpro.com> (tiny change)
2010-01-15 David Abrahams <dave@boostpro.com>
 
* net/mairix.el (mairix-widget-send-query): Send -1 instead of nil
to mairix-search to suppress threading (Bug#5342).
......
......@@ -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)
......@@ -3466,7 +3474,7 @@ Without an argument, it saves customized diff argument, if available
(defun ediff-inferior-compare-regions ()
"Compare regions in an active Ediff session.
Like ediff-regions-linewise but is called from under an active Ediff session on
Like `ediff-regions-linewise' but is called from under an active Ediff session on
the files that belong to that session.
After quitting the session invoked via this function, type C-l to the parent
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment