/[emacs]/emacs/lisp/tooltip.el
ViewVC logotype

Diff of /emacs/lisp/tooltip.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.45 by nickrob, Wed Mar 30 08:33:43 2005 UTC revision 1.46 by kfstorm, Thu Mar 31 10:10:39 2005 UTC
# Line 469  This function must return nil if it does Line 469  This function must return nil if it does
469  (defun tooltip-show-help-function (msg)  (defun tooltip-show-help-function (msg)
470    "Function installed as `show-help-function'.    "Function installed as `show-help-function'.
471  MSG is either a help string to display, or nil to cancel the display."  MSG is either a help string to display, or nil to cancel the display."
472    (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)))  
              (car pos) (>= (car pos) 0)  
              (cdr pos) (>= (cdr pos) 0)  
              (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 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))))))  
473      (setq tooltip-help-message msg)      (setq tooltip-help-message msg)
474      (cond ((null msg)      (cond ((null msg)
475             ;; Cancel display.  This also cancels a delayed tip, if             ;; Cancel display.  This also cancels a delayed tip, if

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26