Function: ediff-focus-on-regexp-matches
ediff-focus-on-regexp-matches is a byte-compiled function defined in
ediff-util.el.gz.
Signature
(ediff-focus-on-regexp-matches N)
Documentation
Focus on diffs that match regexp ediff-regexp-focus-A/B.
Regions to be ignored according to this function are those where
buf A region doesn't match ediff-regexp-focus-A and buf B region
doesn't match ediff-regexp-focus-B.
This function returns nil if the region number N (specified as
an argument) is not to be ignored and t if region N is to be ignored.
N is a region number used by Ediff internally. It is 1 less the number seen by the user.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/ediff-util.el.gz
(defun ediff-focus-on-regexp-matches (n)
"Focus on diffs that match regexp `ediff-regexp-focus-A/B'.
Regions to be ignored according to this function are those where
buf A region doesn't match `ediff-regexp-focus-A' and buf B region
doesn't match `ediff-regexp-focus-B'.
This function returns nil if the region number N (specified as
an argument) is not to be ignored and t if region N is to be ignored.
N is a region number used by Ediff internally. It is 1 less
the number seen by the user."
(if (ediff-valid-difference-p n)
(let* ((ctl-buf ediff-control-buffer)
(regex-A ediff-regexp-focus-A)
(regex-B ediff-regexp-focus-B)
(regex-C ediff-regexp-focus-C)
(reg-A-match (ediff-with-current-buffer ediff-buffer-A
(save-restriction
(narrow-to-region
(ediff-get-diff-posn 'A 'beg n ctl-buf)
(ediff-get-diff-posn 'A 'end n ctl-buf))
(goto-char (point-min))
(re-search-forward regex-A nil t))))
(reg-B-match (ediff-with-current-buffer ediff-buffer-B
(save-restriction
(narrow-to-region
(ediff-get-diff-posn 'B 'beg n ctl-buf)
(ediff-get-diff-posn 'B 'end n ctl-buf))
(goto-char (point-min))
(re-search-forward regex-B nil t))))
(reg-C-match (if ediff-3way-comparison-job
(ediff-with-current-buffer ediff-buffer-C
(save-restriction
(narrow-to-region
(ediff-get-diff-posn 'C 'beg n ctl-buf)
(ediff-get-diff-posn 'C 'end n ctl-buf))
(goto-char (point-min))
(re-search-forward regex-C nil t))))))
(not (eval (if ediff-3way-comparison-job
(list ediff-focus-regexp-connective
reg-A-match reg-B-match reg-C-match)
(list ediff-focus-regexp-connective
reg-A-match reg-B-match))))
)))