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

Diff of /emacs/lisp/mouse.el

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

revision 1.262 by monnier, Tue Jan 11 15:36:57 2005 UTC revision 1.263 by kfstorm, Wed Jan 12 10:17:02 2005 UTC
# Line 771  If the click is in the echo area, displa Line 771  If the click is in the echo area, displa
771    
772  A clickable link is identified by one of the following methods:  A clickable link is identified by one of the following methods:
773    
774  1) If the character at POS has a non-nil `follow-link' text or  If the character at POS has a non-nil `follow-link' text or
775  overlay property, the value of that property is returned.  overlay property, use the value of that property as action code,
776    or if there is a local key-binding or a keybinding at position
777    POS for the `follow-link' event, use the binding of that event as
778    action code.
779    
780  2) If there is a local key-binding or a keybinding at position  The action code is used to determine whether POS is inside a link:
 POS for the `follow-link' event, the binding of that event  
 determines whether POS is inside a link:  
781    
782  - If the binding is `mouse-face', POS is inside a link if there  - If the action code is `mouse-face', POS is inside a link if there
783  is a non-nil `mouse-face' property at POS.  Return t in this case.  is a non-nil `mouse-face' property at POS.  Return t in this case.
784    
785  - If the binding is a function, FUNC, POS is inside a link if  - If the action code is a function, FUNC, POS is inside a link if
786  the call \(FUNC POS) returns non-nil.  Return the return value  the call \(FUNC POS) returns non-nil.  Return the return value
787  from that call.  from that call.
788    
789  - Otherwise, return the binding of the `follow-link' binding.  - Otherwise, return the action code itself.
790    
791  The return value is interpreted as follows:  The return value is interpreted as follows:
792    
# Line 799  click is the local or global binding of Line 800  click is the local or global binding of
800    
801  - Otherwise, the mouse-1 event is translated into a mouse-2 event  - Otherwise, the mouse-1 event is translated into a mouse-2 event
802  at the same position."  at the same position."
803    (or (get-char-property pos 'follow-link)    (let ((action
804        (save-excursion           (or (get-char-property pos 'follow-link)
805          (goto-char pos)               (save-excursion
806          (let ((b (key-binding [follow-link] nil t)))                 (goto-char pos)
807            (cond                 (key-binding [follow-link] nil t)))))
808             ((eq b 'mouse-face)      (cond
809              (and (get-char-property pos 'mouse-face) t))       ((eq action 'mouse-face)
810             ((functionp b)        (and (get-char-property pos 'mouse-face) t))
811              (funcall b pos))       ((functionp action)
812             (t b))))))        (funcall action pos))
813         (t action))))
814    
815  (defun mouse-drag-region-1 (start-event)  (defun mouse-drag-region-1 (start-event)
816    (mouse-minibuffer-check start-event)    (mouse-minibuffer-check start-event)

Legend:
Removed from v.1.262  
changed lines
  Added in v.1.263

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