;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff
-;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.sunysb.edu>
(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 buffer point)
- (let (is-current face diff-num face-help)
- (if buffer
- ;; Emacs 21 calling sequence.
- (progn
- (setq is-current (get-char-property point 'ediff buffer))
- (setq face (get-char-property point 'face buffer))
- (if (stringp face)
- (setq face (intern face)))
- (setq diff-num (get-char-property point 'ediff-diff-num buffer)))
- ;; XEmacs calling sequence.
- (setq is-current (ediff-overlay-get extent-or-window 'ediff))
- (setq face (ediff-overlay-get extent-or-window 'face))
- (setq diff-num (ediff-overlay-get extent-or-window 'ediff-diff-num)))
+(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)))
;; 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)))
- ;; This doesn't DTRT because we may have got it from the wrong
- ;; goverlay. Fixme.
-;;; (face-help) ; refinement of current diff region
+ (face-help) ; refinement of current diff region
(diff-num ; non-current
(format "Difference region %S -- non-current" (1+ diff-num)))
(t "")) ; none