changeset 30373:6da8732233ea

(ediff-region-help-echo): Modify to use overlay now passed to the function. It now works properly.
author Dave Love <fx@gnu.org>
date Fri, 21 Jul 2000 19:42:34 +0000
parents 2047c9586451
children b151dcb1bf9f
files lisp/ediff-init.el
diffstat 1 files changed, 10 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ediff-init.el	Fri Jul 21 15:54:52 2000 +0000
+++ b/lisp/ediff-init.el	Fri Jul 21 19:42:34 2000 +0000
@@ -1,6 +1,6 @@
 ;;; 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>
 
@@ -811,29 +811,21 @@
   (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