From: Dave Love Date: Fri, 21 Jul 2000 19:42:57 +0000 (+0000) Subject: (ediff-region-help-echo): Modify to use overlay X-Git-Tag: emacs-pretest-21.0.90~2687 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=475de6f44dac29ebbb4d0f4b3171f5d9ad5aac3d;p=emacs.git (ediff-region-help-echo): Modify to use overlay now passed to the function. It now works properly. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c3c4dd9d59f..fb3d4c05a81 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2000-07-21 Dave Love + * ediff-init.el (ediff-region-help-echo): Modify to use overlay + now passed to the function. It now works properly. + * smerge-mode.el (smerge-mode-menu): Fill it out. 2000-07-20 Gerd Moellmann 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 @@ -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