comparison lisp/ediff-init.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 1c34b0b56515
children 74f2f6095fa9
comparison
equal deleted inserted replaced
44027:f0defd788eef 44028:182881d68883
76 (defun ediff-has-face-support-p () 76 (defun ediff-has-face-support-p ()
77 (cond ((ediff-window-display-p)) 77 (cond ((ediff-window-display-p))
78 (ediff-force-faces) 78 (ediff-force-faces)
79 ((ediff-color-display-p)) 79 ((ediff-color-display-p))
80 (ediff-emacs-p (memq (ediff-device-type) '(pc))) 80 (ediff-emacs-p (memq (ediff-device-type) '(pc)))
81 (ediff-xemacs-p (memq (ediff-device-type) '(tty pc))))) 81 (ediff-xemacs-p (memq (ediff-device-type) '(tty pc)))
82 ))
82 83
83 ;; toolbar support for emacs hasn't been implemented in ediff 84 ;; toolbar support for emacs hasn't been implemented in ediff
84 (defun ediff-has-toolbar-support-p () 85 (defun ediff-has-toolbar-support-p ()
85 (ediff-cond-compile-for-xemacs-or-emacs 86 (ediff-cond-compile-for-xemacs-or-emacs
86 (and (featurep 'toolbar) (console-on-window-system-p)) ; xemacs form 87 (and (featurep 'toolbar) (console-on-window-system-p)) ; xemacs form
286 ediff-merge-files-with-ancestor 287 ediff-merge-files-with-ancestor
287 ediff-merge-buffers-with-ancestor 288 ediff-merge-buffers-with-ancestor
288 ediff-merge-revisions 289 ediff-merge-revisions
289 ediff-merge-revisions-with-ancestor))) 290 ediff-merge-revisions-with-ancestor)))
290 (ediff-defvar-local ediff-merge-job nil "") 291 (ediff-defvar-local ediff-merge-job nil "")
292
293 (defmacro ediff-patch-job ()
294 `(eq ediff-job-name 'epatch))
291 295
292 (defmacro ediff-merge-with-ancestor-job () 296 (defmacro ediff-merge-with-ancestor-job ()
293 `(memq 297 `(memq
294 ediff-job-name 298 ediff-job-name
295 '(ediff-merge-files-with-ancestor 299 '(ediff-merge-files-with-ancestor
628 Otherwise, all difference regions are highlighted, but the selected region is 632 Otherwise, all difference regions are highlighted, but the selected region is
629 shown in brighter colors." 633 shown in brighter colors."
630 :type 'boolean 634 :type 'boolean
631 :group 'ediff-highlighting) 635 :group 'ediff-highlighting)
632 636
633 ;; A var local to each control panel buffer. Indicates highlighting style
634 ;; in effect for this buffer: `face', `ascii', nil -- temporarily
635 ;; unhighlighted, `off' -- turned off \(on a dumb terminal only\).
636 (ediff-defvar-local ediff-highlighting-style nil "")
637
638 637
639 ;; The suffix of the control buffer name. 638 ;; The suffix of the control buffer name.
640 (ediff-defvar-local ediff-control-buffer-suffix nil "") 639 (ediff-defvar-local ediff-control-buffer-suffix nil "")
641 ;; Same as ediff-control-buffer-suffix, but without <,>. 640 ;; Same as ediff-control-buffer-suffix, but without <,>.
642 ;; It's a number rather than string. 641 ;; It's a number rather than string.
805 (if (fboundp 'display-color-p) ; emacs form 804 (if (fboundp 'display-color-p) ; emacs form
806 (display-color-p) 805 (display-color-p)
807 (x-display-color-p)) 806 (x-display-color-p))
808 ) 807 )
809 (error nil))) 808 (error nil)))
809
810
811 ;; A var local to each control panel buffer. Indicates highlighting style
812 ;; in effect for this buffer: `face', `ascii',
813 ;; `off' -- turned off \(on a dumb terminal only\).
814 (ediff-defvar-local ediff-highlighting-style
815 (if (and (ediff-has-face-support-p) ediff-use-faces) 'face 'ascii)
816 "")
810 817
811 818
812 (if (ediff-has-face-support-p) 819 (if (ediff-has-face-support-p)
813 (ediff-cond-compile-for-xemacs-or-emacs 820 (ediff-cond-compile-for-xemacs-or-emacs
814 (progn ; xemacs 821 (progn ; xemacs