diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2004-12-23 16:43:51 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2004-12-23 16:43:51 +0000 |
commit | 17d51b68fb4e7da4f18eff72c589b7ffc4f9c22c (patch) | |
tree | f490c1ccdbd43077ea77f953bc59ca94c2fe810c /lisp/tooltip.el | |
parent | 4b89585ee70a1f64543a5851f07cf7e2d89c5c62 (diff) | |
parent | 55f4edbcd246d8ea1715687a7aeeb3afe35c0345 (diff) | |
download | emacs-17d51b68fb4e7da4f18eff72c589b7ffc4f9c22c.tar.gz emacs-17d51b68fb4e7da4f18eff72c589b7ffc4f9c22c.tar.bz2 emacs-17d51b68fb4e7da4f18eff72c589b7ffc4f9c22c.zip |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-726
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-727
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-728
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-729
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-730
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-731
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-732
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-733
Update from CVS: man/calc.texi: Fix some TeX definitions.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-734
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-735
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-736
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-737
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-738
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-739
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-740
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-741
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-742
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-743
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-744
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-745
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-746
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-75
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-76
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-77
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-277
Diffstat (limited to 'lisp/tooltip.el')
-rw-r--r-- | lisp/tooltip.el | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 5bcb28dde52..2e60df02459 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el @@ -1,6 +1,7 @@ ;;; tooltip.el --- show tooltip windows -;; Copyright (C) 1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 +;; Free Software Foundation, Inc. ;; Author: Gerd Moellmann <gerd@acm.org> ;; Keywords: help c mouse tools @@ -476,7 +477,25 @@ This function must return nil if it doesn't handle EVENT." (defun tooltip-show-help-function (msg) "Function installed as `show-help-function'. MSG is either a help string to display, or nil to cancel the display." - (let ((previous-help tooltip-help-message)) + (let ((previous-help tooltip-help-message) + mp pos) + (if (and mouse-1-click-follows-link + (stringp msg) + (save-match-data + (string-match "^mouse-2" msg)) + (setq mp (mouse-pixel-position)) + (consp (setq pos (cdr mp))) + (setq pos (posn-at-x-y (car pos) (cdr pos) (car mp))) + (windowp (posn-window pos))) + (with-current-buffer (window-buffer (posn-window pos)) + (if (mouse-on-link-p (posn-point pos)) + (setq msg (concat + (cond + ((eq mouse-1-click-follows-link 'double) "double-") + ((and (integerp mouse-1-click-follows-link) + (< mouse-1-click-follows-link 0)) "Long ") + (t "")) + "mouse-1" (substring msg 7)))))) (setq tooltip-help-message msg) (cond ((null msg) ;; Cancel display. This also cancels a delayed tip, if |