+(defcustom ediff-version-control-package 'vc
+ "Version control package used.
+Currently, Ediff supports vc.el, rcs.el, pcl-cvs.el, and generic-sc.el. The
+standard Emacs interface to RCS, CVS, SCCS, etc., is vc.el. However, some
+people find the other two packages more convenient. Set this variable to the
+appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire."
+ :type 'symbol
+ :group 'ediff)
+
+(defcustom ediff-coding-system-for-read 'raw-text
+ "*The coding system for read to use when running the diff program as a subprocess.
+In most cases, the default will do. However, under certain circumstances in
+Windows NT/98/95 you might need to use something like 'raw-text-dos here.
+So, if the output that your diff program sends to Emacs contains extra ^M's,
+you might need to experiment here, if the default or 'raw-text-dos doesn't
+work."
+ :type 'symbol
+ :group 'ediff)
+
+(defcustom ediff-coding-system-for-write 'no-conversion
+ "*The coding system for write to use when writing out difference regions
+to temp files when Ediff needs to find fine differences."
+ :type 'symbol
+ :group 'ediff)
+
+
+(ediff-cond-compile-for-xemacs-or-emacs
+ (progn ; xemacs
+ (defalias 'ediff-read-event 'next-command-event)
+ (defalias 'ediff-overlayp 'extentp)
+ (defalias 'ediff-make-overlay 'make-extent)
+ (defalias 'ediff-delete-overlay 'delete-extent))
+ (progn ; emacs
+ (defalias 'ediff-read-event 'read-event)
+ (defalias 'ediff-overlayp 'overlayp)
+ (defalias 'ediff-make-overlay 'make-overlay)
+ (defalias 'ediff-delete-overlay 'delete-overlay))
+ )
+
+;; Check the current version against the major and minor version numbers
+;; using op: cur-vers op major.minor If emacs-major-version or
+;; emacs-minor-version are not defined, we assume that the current version
+;; is hopelessly outdated. We assume that emacs-major-version and
+;; emacs-minor-version are defined. Otherwise, for Emacs/XEmacs 19, if the
+;; current minor version is < 10 (xemacs) or < 23 (emacs) the return value
+;; will be nil (when op is =, >, or >=) and t (when op is <, <=), which may be
+;; incorrect. However, this gives correct result in our cases, since we are
+;; testing for sufficiently high Emacs versions.
+(defun ediff-check-version (op major minor &optional type-of-emacs)
+ (if (and (boundp 'emacs-major-version) (boundp 'emacs-minor-version))
+ (and (cond ((eq type-of-emacs 'xemacs) ediff-xemacs-p)
+ ((eq type-of-emacs 'emacs) ediff-emacs-p)
+ (t t))
+ (cond ((eq op '=) (and (= emacs-minor-version minor)
+ (= emacs-major-version major)))
+ ((memq op '(> >= < <=))
+ (and (or (funcall op emacs-major-version major)
+ (= emacs-major-version major))
+ (if (= emacs-major-version major)
+ (funcall op emacs-minor-version minor)
+ t)))
+ (t
+ (error "%S: Invalid op in ediff-check-version" op))))
+ (cond ((memq op '(= > >=)) nil)
+ ((memq op '(< <=)) t))))
+
+
+(defun ediff-color-display-p ()
+ (condition-case nil
+ (ediff-cond-compile-for-xemacs-or-emacs
+ (eq (device-class (selected-device)) 'color) ; xemacs form
+ (if (fboundp 'display-color-p) ; emacs form
+ (display-color-p)
+ (x-display-color-p))
+ )
+ (error nil)))
+
+
+;; A var local to each control panel buffer. Indicates highlighting style
+;; in effect for this buffer: `face', `ascii',
+;; `off' -- turned off \(on a dumb terminal only\).
+(ediff-defvar-local ediff-highlighting-style
+ (if (and (ediff-has-face-support-p) ediff-use-faces) 'face 'ascii)
+ "")
+
+
+(if (ediff-has-face-support-p)
+ (ediff-cond-compile-for-xemacs-or-emacs
+ (progn ; xemacs
+ (defalias 'ediff-valid-color-p 'valid-color-name-p)
+ (defalias 'ediff-get-face 'get-face))
+ (progn ; emacs
+ (defalias 'ediff-valid-color-p (if (fboundp 'color-defined-p)
+ 'color-defined-p
+ 'x-color-defined-p))
+ (defalias 'ediff-get-face 'internal-get-face))
+ ))
+
+(if (ediff-window-display-p)
+ (ediff-cond-compile-for-xemacs-or-emacs
+ (progn ; xemacs
+ (defalias 'ediff-display-pixel-width 'device-pixel-width)
+ (defalias 'ediff-display-pixel-height 'device-pixel-height))
+ (progn ; emacs
+ (defalias 'ediff-display-pixel-width
+ (if (fboundp 'display-pixel-width)
+ 'display-pixel-width
+ 'x-display-pixel-width))
+ (defalias 'ediff-display-pixel-height
+ (if (fboundp 'display-pixel-height)
+ 'display-pixel-height
+ 'x-display-pixel-height)))
+ ))
+
+;; A-list of current-diff-overlay symbols associated with buf types
+(defconst ediff-current-diff-overlay-alist
+ '((A . ediff-current-diff-overlay-A)
+ (B . ediff-current-diff-overlay-B)
+ (C . ediff-current-diff-overlay-C)
+ (Ancestor . ediff-current-diff-overlay-Ancestor)))
+
+;; A-list of current-diff-face-* symbols associated with buf types
+(defconst ediff-current-diff-face-alist
+ '((A . ediff-current-diff-A)
+ (B . ediff-current-diff-B)
+ (C . ediff-current-diff-C)
+ (Ancestor . ediff-current-diff-Ancestor)))
+
+
+(defun ediff-set-overlay-face (extent face)
+ (ediff-overlay-put extent 'face face)
+ (ediff-overlay-put extent 'help-echo 'ediff-region-help-echo))
+
+(defun ediff-region-help-echo (extent-or-window &optional overlay point)
+ (unless overlay
+ (setq overlay extent-or-window))
+ (let ((is-current (ediff-overlay-get overlay 'ediff))
+ (face (ediff-overlay-get overlay 'face))
+ (diff-num (ediff-overlay-get overlay 'ediff-diff-num))
+ face-help)
+
+ ;; This happens only for refinement overlays
+ (if (stringp face)
+ (setq face (intern face)))
+ (setq face-help (and face (get face 'ediff-help-echo)))
+
+ (cond ((and is-current diff-num) ; current diff region
+ (format "Difference region %S -- current" (1+ diff-num)))
+ (face-help) ; refinement of current diff region
+ (diff-num ; non-current
+ (format "Difference region %S -- non-current" (1+ diff-num)))
+ (t "")) ; none
+ ))
+
+
+(defun ediff-set-face-pixmap (face pixmap)
+ "Set face pixmap on a monochrome display."
+ (if (and (ediff-window-display-p) (not (ediff-color-display-p)))
+ (condition-case nil
+ (set-face-background-pixmap face pixmap)
+ (error
+ (message "Pixmap not found for %S: %s" (face-name face) pixmap)
+ (sit-for 1)))))
+
+(defun ediff-hide-face (face)
+ (if (and (ediff-has-face-support-p)
+ (boundp 'add-to-list)
+ (boundp 'facemenu-unlisted-faces))
+ (add-to-list 'facemenu-unlisted-faces face)))
+
+
+
+(defface ediff-current-diff-A
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "firebrick" :background "pale green"))
+ (((class color))
+ (:foreground "blue3" :background "yellow3"))
+ (t (:inverse-video t)))
+ '((((type tty)) (:foreground "blue3" :background "yellow3"))
+ (((class color)) (:foreground "firebrick" :background "pale green"))
+ (t (:inverse-video t))))
+ "Face for highlighting the selected difference in buffer A."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-current-diff-face-A 'ediff-current-diff-A
+ "Face for highlighting the selected difference in buffer A.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-current-diff-A'
+this variable represents.")
+(ediff-hide-face ediff-current-diff-face-A)
+;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
+;; This means that some user customization may be trashed.
+(if (and ediff-xemacs-p
+ (ediff-has-face-support-p)
+ (not (ediff-color-display-p)))
+ (copy-face 'modeline ediff-current-diff-face-A))
+
+
+
+(defface ediff-current-diff-B
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "DarkOrchid" :background "Yellow"))
+ (((class color))
+ (:foreground "magenta3" :background "yellow3"
+ :weight bold))
+ (t (:inverse-video t)))
+ '((((type tty)) (:foreground "magenta3" :background "yellow3"
+ :weight bold))
+ (((class color)) (:foreground "DarkOrchid" :background "Yellow"))
+ (t (:inverse-video t))))
+ "Face for highlighting the selected difference in buffer B."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-current-diff-face-B 'ediff-current-diff-B
+ "Face for highlighting the selected difference in buffer B.
+ this variable. Instead, use the customization
+widget to customize the actual face `ediff-current-diff-B'
+this variable represents.")
+(ediff-hide-face ediff-current-diff-face-B)
+;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
+;; This means that some user customization may be trashed.
+(if (and ediff-xemacs-p
+ (ediff-has-face-support-p)
+ (not (ediff-color-display-p)))
+ (copy-face 'modeline ediff-current-diff-face-B))
+
+
+(defface ediff-current-diff-C
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "Navy" :background "Pink"))
+ (((class color))
+ (:foreground "cyan3" :background "yellow3" :weight bold))
+ (t (:inverse-video t)))
+ '((((type tty)) (:foreground "cyan3" :background "yellow3" :weight bold))
+ (((class color)) (:foreground "Navy" :background "Pink"))
+ (t (:inverse-video t))))
+ "Face for highlighting the selected difference in buffer C."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-current-diff-face-C 'ediff-current-diff-C
+ "Face for highlighting the selected difference in buffer C.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-current-diff-C'
+this variable represents.")
+(ediff-hide-face ediff-current-diff-face-C)
+;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
+;; This means that some user customization may be trashed.
+(if (and ediff-xemacs-p
+ (ediff-has-face-support-p)
+ (not (ediff-color-display-p)))
+ (copy-face 'modeline ediff-current-diff-face-C))
+
+
+(defface ediff-current-diff-Ancestor
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "Black" :background "VioletRed"))
+ (((class color))
+ (:foreground "black" :background "magenta3"))
+ (t (:inverse-video t)))
+ '((((type tty)) (:foreground "black" :background "magenta3"))
+ (((class color)) (:foreground "Black" :background "VioletRed"))
+ (t (:inverse-video t))))
+ "Face for highlighting the selected difference in buffer Ancestor."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-current-diff-face-Ancestor 'ediff-current-diff-Ancestor
+ "Face for highlighting the selected difference in buffer Ancestor.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-current-diff-Ancestor'
+this variable represents.")
+(ediff-hide-face ediff-current-diff-face-Ancestor)
+;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
+;; This means that some user customization may be trashed.
+(if (and ediff-xemacs-p
+ (ediff-has-face-support-p)
+ (not (ediff-color-display-p)))
+ (copy-face 'modeline ediff-current-diff-face-Ancestor))
+
+
+(defface ediff-fine-diff-A
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "Navy" :background "sky blue"))
+ (((class color))
+ (:foreground "white" :background "sky blue" :weight bold))
+ (t (:underline t :stipple "gray3")))
+ '((((type tty)) (:foreground "white" :background "sky blue" :weight bold))
+ (((class color)) (:foreground "Navy" :background "sky blue"))
+ (t (:underline t :stipple "gray3"))))
+ "Face for highlighting the refinement of the selected diff in buffer A."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-fine-diff-face-A 'ediff-fine-diff-A
+ "Face for highlighting the fine differences in buffer A.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-fine-diff-A'
+this variable represents.")
+(ediff-hide-face ediff-fine-diff-face-A)
+
+(defface ediff-fine-diff-B
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "Black" :background "cyan"))
+ (((class color))
+ (:foreground "magenta3" :background "cyan3"))
+ (t (:underline t :stipple "gray3")))
+ '((((type tty)) (:foreground "magenta3" :background "cyan3"))
+ (((class color)) (:foreground "Black" :background "cyan"))
+ (t (:underline t :stipple "gray3"))))
+ "Face for highlighting the refinement of the selected diff in buffer B."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-fine-diff-face-B 'ediff-fine-diff-B
+ "Face for highlighting the fine differences in buffer B.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-fine-diff-B'
+this variable represents.")
+(ediff-hide-face ediff-fine-diff-face-B)
+
+(defface ediff-fine-diff-C
+ (if ediff-emacs-p
+ '((((type pc))
+ (:foreground "white" :background "Turquoise"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "Turquoise"))
+ (((class color))
+ (:foreground "yellow3" :background "Turquoise"
+ :weight bold))
+ (t (:underline t :stipple "gray3")))
+ '((((type tty)) (:foreground "yellow3" :background "Turquoise"
+ :weight bold))
+ (((type pc)) (:foreground "white" :background "Turquoise"))
+ (((class color)) (:foreground "Black" :background "Turquoise"))
+ (t (:underline t :stipple "gray3"))))
+ "Face for highlighting the refinement of the selected diff in buffer C."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-fine-diff-face-C 'ediff-fine-diff-C
+ "Face for highlighting the fine differences in buffer C.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-fine-diff-C'
+this variable represents.")
+(ediff-hide-face ediff-fine-diff-face-C)
+
+(defface ediff-fine-diff-Ancestor
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "Black" :background "Green"))
+ (((class color))
+ (:foreground "red3" :background "green"))
+ (t (:underline t :stipple "gray3")))
+ '((((type tty)) (:foreground "red3" :background "green"))
+ (((class color)) (:foreground "Black" :background "Green"))
+ (t (:underline t :stipple "gray3"))))
+ "Face for highlighting the refinement of the selected diff in the ancestor buffer.
+At present, this face is not used and no fine differences are computed for the
+ancestor buffer."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-fine-diff-face-Ancestor 'ediff-fine-diff-Ancestor
+ "Face for highlighting the fine differences in buffer Ancestor.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-fine-diff-Ancestor'
+this variable represents.")
+(ediff-hide-face ediff-fine-diff-face-Ancestor)
+
+;; Some installs don't have stipple or Stipple. So, try them in turn.
+(defvar stipple-pixmap
+ (cond ((not (ediff-has-face-support-p)) nil)
+ ((and (boundp 'x-bitmap-file-path)
+ (locate-library "stipple" t x-bitmap-file-path)) "stipple")
+ ((and (boundp 'mswindowsx-bitmap-file-path)
+ (locate-library "stipple" t mswindowsx-bitmap-file-path)) "stipple")
+ (t "Stipple")))
+
+(defface ediff-even-diff-A
+ (if ediff-emacs-p
+ `((((type pc))
+ (:foreground "green3" :background "light grey"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "light grey"))
+ (((class color))
+ (:foreground "red3" :background "light grey"
+ :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
+ `((((type tty)) (:foreground "red3" :background "light grey"
+ :weight bold))
+ (((type pc)) (:foreground "green3" :background "light grey"))
+ (((class color)) (:foreground "Black" :background "light grey"))
+ (t (:italic t :stipple ,stipple-pixmap))))
+ "Face for highlighting even-numbered non-current differences in buffer A."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-even-diff-face-A 'ediff-even-diff-A
+ "Face for highlighting even-numbered non-current differences in buffer A.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-even-diff-A'
+this variable represents.")
+(ediff-hide-face ediff-even-diff-face-A)
+
+(defface ediff-even-diff-B
+ (if ediff-emacs-p
+ `((((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "blue3" :background "Grey" :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
+ `((((type tty)) (:foreground "blue3" :background "Grey" :weight bold))
+ (((class color)) (:foreground "White" :background "Grey"))
+ (t (:italic t :stipple ,stipple-pixmap))))
+ "Face for highlighting even-numbered non-current differences in buffer B."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-even-diff-face-B 'ediff-even-diff-B
+ "Face for highlighting even-numbered non-current differences in buffer B.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-even-diff-B'
+this variable represents.")
+(ediff-hide-face ediff-even-diff-face-B)
+
+(defface ediff-even-diff-C
+ (if ediff-emacs-p
+ `((((type pc))
+ (:foreground "yellow3" :background "light grey"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "light grey"))
+ (((class color))
+ (:foreground "yellow3" :background "light grey"
+ :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
+ `((((type tty)) (:foreground "yellow3" :background "light grey"
+ :weight bold))
+ (((type pc)) (:foreground "yellow3" :background "light grey"))
+ (((class color)) (:foreground "Black" :background "light grey"))
+ (t (:italic t :stipple ,stipple-pixmap))))
+ "Face for highlighting even-numbered non-current differences in buffer C."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-even-diff-face-C 'ediff-even-diff-C
+ "Face for highlighting even-numbered non-current differences in buffer C.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-even-diff-C'
+this variable represents.")
+(ediff-hide-face ediff-even-diff-face-C)
+
+(defface ediff-even-diff-Ancestor
+ (if ediff-emacs-p
+ `((((type pc))
+ (:foreground "cyan3" :background "light grey"))
+ (((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "cyan3" :background "light grey"
+ :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
+ `((((type tty)) (:foreground "cyan3" :background "light grey"
+ :weight bold))
+ (((type pc)) (:foreground "cyan3" :background "light grey"))
+ (((class color)) (:foreground "White" :background "Grey"))
+ (t (:italic t :stipple ,stipple-pixmap))))
+ "Face for highlighting even-numbered non-current differences in the ancestor buffer."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-even-diff-face-Ancestor 'ediff-even-diff-Ancestor
+ "Face for highlighting even-numbered non-current differences in buffer Ancestor.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-even-diff-Ancestor'
+this variable represents.")
+(ediff-hide-face ediff-even-diff-face-Ancestor)
+
+;; Association between buffer types and even-diff-face symbols
+(defconst ediff-even-diff-face-alist
+ '((A . ediff-even-diff-A)
+ (B . ediff-even-diff-B)
+ (C . ediff-even-diff-C)
+ (Ancestor . ediff-even-diff-Ancestor)))
+
+(defface ediff-odd-diff-A
+ (if ediff-emacs-p
+ '((((type pc))
+ (:foreground "green3" :background "gray40"))
+ (((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "red3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
+ '((((type tty)) (:foreground "red3" :background "black" :weight bold))
+ (((type pc)) (:foreground "green3" :background "gray40"))
+ (((class color)) (:foreground "White" :background "Grey"))
+ (t (:italic t :stipple "gray1"))))
+ "Face for highlighting odd-numbered non-current differences in buffer A."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-odd-diff-face-A 'ediff-odd-diff-A
+ "Face for highlighting odd-numbered non-current differences in buffer A.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-odd-diff-A'
+this variable represents.")
+(ediff-hide-face ediff-odd-diff-face-A)
+
+
+(defface ediff-odd-diff-B
+ (if ediff-emacs-p
+ '((((type pc))
+ (:foreground "White" :background "gray40"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "light grey"))
+ (((class color))
+ (:foreground "cyan3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
+ '((((type tty)) (:foreground "cyan3" :background "black" :weight bold))
+ (((type pc)) (:foreground "White" :background "gray40"))
+ (((class color)) (:foreground "Black" :background "light grey"))
+ (t (:italic t :stipple "gray1"))))
+ "Face for highlighting odd-numbered non-current differences in buffer B."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-odd-diff-face-B 'ediff-odd-diff-B
+ "Face for highlighting odd-numbered non-current differences in buffer B.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-odd-diff-B'
+this variable represents.")
+(ediff-hide-face ediff-odd-diff-face-B)
+
+(defface ediff-odd-diff-C
+ (if ediff-emacs-p
+ '((((type pc))
+ (:foreground "yellow3" :background "gray40"))
+ (((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "yellow3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
+ '((((type tty)) (:foreground "yellow3" :background "black" :weight bold))
+ (((type pc)) (:foreground "yellow3" :background "gray40"))
+ (((class color)) (:foreground "White" :background "Grey"))
+ (t (:italic t :stipple "gray1"))))
+ "Face for highlighting odd-numbered non-current differences in buffer C."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-odd-diff-face-C 'ediff-odd-diff-C
+ "Face for highlighting odd-numbered non-current differences in buffer C.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-odd-diff-C'
+this variable represents.")
+(ediff-hide-face ediff-odd-diff-face-C)
+
+(defface ediff-odd-diff-Ancestor
+ (if ediff-emacs-p
+ '((((class color) (min-colors 16))
+ (:foreground "cyan3" :background "gray40"))
+ (((class color))
+ (:foreground "green3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
+ '((((type tty)) (:foreground "green3" :background "black" :weight bold))
+ (((class color)) (:foreground "cyan3" :background "gray40"))
+ (t (:italic t :stipple "gray1"))))
+ "Face for highlighting odd-numbered non-current differences in the ancestor buffer."
+ :group 'ediff-highlighting)
+;; An internal variable. Ediff takes the face from here. When unhighlighting,
+;; this variable is set to nil, then again to the appropriate face.
+(defvar ediff-odd-diff-face-Ancestor 'ediff-odd-diff-Ancestor
+ "Face for highlighting odd-numbered non-current differences in buffer Ancestor.
+DO NOT CHANGE this variable. Instead, use the customization
+widget to customize the actual face object `ediff-odd-diff-Ancestor'
+this variable represents.")
+(ediff-hide-face ediff-odd-diff-face-Ancestor)
+
+;; Association between buffer types and odd-diff-face symbols
+(defconst ediff-odd-diff-face-alist
+ '((A . ediff-odd-diff-A)
+ (B . ediff-odd-diff-B)
+ (C . ediff-odd-diff-C)
+ (Ancestor . ediff-odd-diff-Ancestor)))
+
+;; A-list of fine-diff face symbols associated with buffer types
+(defconst ediff-fine-diff-face-alist
+ '((A . ediff-fine-diff-A)
+ (B . ediff-fine-diff-B)
+ (C . ediff-fine-diff-C)
+ (Ancestor . ediff-fine-diff-Ancestor)))
+
+;; Help echo
+(put ediff-fine-diff-face-A 'ediff-help-echo
+ "A `refinement' of the current difference region")
+(put ediff-fine-diff-face-B 'ediff-help-echo
+ "A `refinement' of the current difference region")
+(put ediff-fine-diff-face-C 'ediff-help-echo
+ "A `refinement' of the current difference region")
+(put ediff-fine-diff-face-Ancestor 'ediff-help-echo
+ "A `refinement' of the current difference region")
+
+(add-hook 'ediff-quit-hook 'ediff-cleanup-mess)
+(add-hook 'ediff-suspend-hook 'ediff-default-suspend-function)