Mercurial > emacs
comparison lisp/ediff-diff.el @ 44028:182881d68883
* ediff-diff.el (ediff-install-fine-diff-if-necessary): take
the current highlighting style into account.
(ediff-forward-word-function,ediff-whitespace,ediff-word-1,
ediff-word-2,ediff-word-3,ediff-word-4): make them buffer local.
* ediff-init.el (ediff-patch-job): new macro.
* ediff-mult.el (ediff-make-new-meta-list-header): new API function.
(ediff-intersect-directories): use ediff-make-new-meta-list-header.
* ediff-ptch.el (ediff-map-patch-buffer): use
ediff-make-new-meta-list-header.
(ediff-fixup-patch-map): use the meta-list API from ediff-mult.el.
* ediff-util.el (ediff-toggle-hilit): fix toggling of highliting.
(ediff-select-difference): take highlighting style into account.
(ediff-clone-buffer-for-region-comparison): new function.
(ediff-inferior-compare-regions): added comparison of current diff
regions.
* ediff.el (ediff-clone-buffer-for-region-comparison,
ediff-clone-buffer-for-window-comparison): moved to ediff-util.el.
author | Michael Kifer <kifer@cs.stonybrook.edu> |
---|---|
date | Wed, 20 Mar 2002 06:36:18 +0000 |
parents | 633233bf2bbf |
children | bd315b9fa3f0 |
comparison
equal
deleted
inserted
replaced
44027:f0defd788eef | 44028:182881d68883 |
---|---|
781 (ediff-set-fine-diff-properties n) | 781 (ediff-set-fine-diff-properties n) |
782 ))) | 782 ))) |
783 | 783 |
784 ;; Interface to ediff-make-fine-diffs. Checks for auto-refine limit, etc. | 784 ;; Interface to ediff-make-fine-diffs. Checks for auto-refine limit, etc. |
785 (defun ediff-install-fine-diff-if-necessary (n) | 785 (defun ediff-install-fine-diff-if-necessary (n) |
786 (cond ((eq ediff-auto-refine 'on) | 786 (cond ((and (eq ediff-auto-refine 'on) |
787 ediff-use-faces | |
788 (not (eq ediff-highlighting-style 'off)) | |
789 (not (eq ediff-highlighting-style 'ascii))) | |
787 (if (and | 790 (if (and |
788 (> ediff-auto-refine-limit | 791 (> ediff-auto-refine-limit |
789 (- (ediff-get-diff-posn 'A 'end n) | 792 (- (ediff-get-diff-posn 'A 'end n) |
790 (ediff-get-diff-posn 'A 'beg n))) | 793 (ediff-get-diff-posn 'A 'beg n))) |
791 (> ediff-auto-refine-limit | 794 (> ediff-auto-refine-limit |
1213 ;;; Word functions used to refine the current diff | 1216 ;;; Word functions used to refine the current diff |
1214 | 1217 |
1215 (defvar ediff-forward-word-function 'ediff-forward-word | 1218 (defvar ediff-forward-word-function 'ediff-forward-word |
1216 "*Function to call to move to the next word. | 1219 "*Function to call to move to the next word. |
1217 Used for splitting difference regions into individual words.") | 1220 Used for splitting difference regions into individual words.") |
1221 (make-variable-buffer-local 'ediff-forward-word-function) | |
1218 | 1222 |
1219 (defvar ediff-whitespace " \n\t\f" | 1223 (defvar ediff-whitespace " \n\t\f" |
1220 "*Characters constituting white space. | 1224 "*Characters constituting white space. |
1221 These characters are ignored when differing regions are split into words.") | 1225 These characters are ignored when differing regions are split into words.") |
1226 (make-variable-buffer-local 'ediff-whitespace) | |
1222 | 1227 |
1223 (defvar ediff-word-1 | 1228 (defvar ediff-word-1 |
1224 (ediff-cond-compile-for-xemacs-or-emacs "a-zA-Z---_" "-[:word:]_") | 1229 (ediff-cond-compile-for-xemacs-or-emacs "a-zA-Z---_" "-[:word:]_") |
1225 "*Characters that constitute words of type 1. | 1230 "*Characters that constitute words of type 1. |
1226 More precisely, [ediff-word-1] is a regexp that matches type 1 words. | 1231 More precisely, [ediff-word-1] is a regexp that matches type 1 words. |
1227 See `ediff-forward-word' for more details.") | 1232 See `ediff-forward-word' for more details.") |
1233 (make-variable-buffer-local 'ediff-word-1) | |
1228 | 1234 |
1229 (defvar ediff-word-2 "0-9.," | 1235 (defvar ediff-word-2 "0-9.," |
1230 "*Characters that constitute words of type 2. | 1236 "*Characters that constitute words of type 2. |
1231 More precisely, [ediff-word-2] is a regexp that matches type 2 words. | 1237 More precisely, [ediff-word-2] is a regexp that matches type 2 words. |
1232 See `ediff-forward-word' for more details.") | 1238 See `ediff-forward-word' for more details.") |
1239 (make-variable-buffer-local 'ediff-word-2) | |
1233 | 1240 |
1234 (defvar ediff-word-3 "`'?!:;\"{}[]()" | 1241 (defvar ediff-word-3 "`'?!:;\"{}[]()" |
1235 "*Characters that constitute words of type 3. | 1242 "*Characters that constitute words of type 3. |
1236 More precisely, [ediff-word-3] is a regexp that matches type 3 words. | 1243 More precisely, [ediff-word-3] is a regexp that matches type 3 words. |
1237 See `ediff-forward-word' for more details.") | 1244 See `ediff-forward-word' for more details.") |
1245 (make-variable-buffer-local 'ediff-word-3) | |
1238 | 1246 |
1239 (defvar ediff-word-4 | 1247 (defvar ediff-word-4 |
1240 (concat "^" ediff-word-1 ediff-word-2 ediff-word-3 ediff-whitespace) | 1248 (concat "^" ediff-word-1 ediff-word-2 ediff-word-3 ediff-whitespace) |
1241 "*Characters that constitute words of type 4. | 1249 "*Characters that constitute words of type 4. |
1242 More precisely, [ediff-word-4] is a regexp that matches type 4 words. | 1250 More precisely, [ediff-word-4] is a regexp that matches type 4 words. |
1243 See `ediff-forward-word' for more details.") | 1251 See `ediff-forward-word' for more details.") |
1252 (make-variable-buffer-local 'ediff-word-4) | |
1244 | 1253 |
1245 ;; Split region along word boundaries. Each word will be on its own line. | 1254 ;; Split region along word boundaries. Each word will be on its own line. |
1246 ;; Output to buffer out-buffer. | 1255 ;; Output to buffer out-buffer. |
1247 (defun ediff-forward-word () | 1256 (defun ediff-forward-word () |
1248 "Move point one word forward. | 1257 "Move point one word forward. |