Commit 475de6f4 authored by Dave Love's avatar Dave Love
Browse files

(ediff-region-help-echo): Modify to use overlay

now passed to the function.  It now works properly.
parent c20aeb83
2000-07-21 Dave Love <fx@gnu.org>
* 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 <gerd@gnu.org>
......
;;; 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment