diff options
author | Dave Love <fx@gnu.org> | 2000-07-21 19:42:57 +0000 |
---|---|---|
committer | Dave Love <fx@gnu.org> | 2000-07-21 19:42:57 +0000 |
commit | 475de6f44dac29ebbb4d0f4b3171f5d9ad5aac3d (patch) | |
tree | b0ca0126bc5895950ce940762fcf6929ed1178da /lisp/ediff-init.el | |
parent | c20aeb834ddd34c72cf4f538ded8f8078a768ee0 (diff) | |
download | emacs-475de6f44dac29ebbb4d0f4b3171f5d9ad5aac3d.tar.gz |
(ediff-region-help-echo): Modify to use overlay
now passed to the function. It now works properly.
Diffstat (limited to 'lisp/ediff-init.el')
-rw-r--r-- | lisp/ediff-init.el | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el index 675e23f548e..55b1983d428 100644 --- a/lisp/ediff-init.el +++ b/lisp/ediff-init.el @@ -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 @@ appropriate symbol: `rcs', `pcl-cvs', or `generic-sc' if you so desire." (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 |