/[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.268 by kfstorm, Fri Feb 25 23:30:59 2005 UTC revision 1.269 by kfstorm, Thu Mar 31 10:10:25 2005 UTC
# Line 49  Line 49 
49    :version "22.1"    :version "22.1"
50    :group 'mouse)    :group 'mouse)
51    
52  (defcustom mouse-1-click-follows-link 350  (defcustom mouse-1-click-follows-link 450
53    "Non-nil means that clicking Mouse-1 on a link follows the link.    "Non-nil means that clicking Mouse-1 on a link follows the link.
54    
55  With the default setting, an ordinary Mouse-1 click on a link  With the default setting, an ordinary Mouse-1 click on a link
# Line 837  at the same position." Line 837  at the same position."
837              (funcall action pos))              (funcall action pos))
838             (t action)))))))             (t action)))))))
839    
840    (defun mouse-fixup-help-message (msg)
841      "Fix help message MSG for `mouse-1-click-follows-link'."
842      (let (mp pos)
843        (if (and mouse-1-click-follows-link
844                 (stringp msg)
845                 (save-match-data
846                   (string-match "^mouse-2" msg))
847                 (setq mp (mouse-pixel-position))
848                 (consp (setq pos (cdr mp)))
849                 (car pos) (>= (car pos) 0)
850                 (cdr pos) (>= (cdr pos) 0)
851                 (setq pos (posn-at-x-y (car pos) (cdr pos) (car mp)))
852                 (windowp (posn-window pos)))
853            (with-current-buffer (window-buffer (posn-window pos))
854              (if (mouse-on-link-p pos)
855                  (setq msg (concat
856                        (cond
857                         ((eq mouse-1-click-follows-link 'double) "double-")
858                         ((and (integerp mouse-1-click-follows-link)
859                               (< mouse-1-click-follows-link 0)) "Long ")
860                         (t ""))
861                        "mouse-1" (substring msg 7)))))))
862      msg)
863    
864  (defun mouse-drag-region-1 (start-event)  (defun mouse-drag-region-1 (start-event)
865    (mouse-minibuffer-check start-event)    (mouse-minibuffer-check start-event)
# Line 886  at the same position." Line 909  at the same position."
909        (track-mouse        (track-mouse
910          (while (progn          (while (progn
911                   (setq event (read-event))                   (setq event (read-event))
912                     (setq mve (cons event (and (boundp 'mve) mve)))
913                   (or (mouse-movement-p event)                   (or (mouse-movement-p event)
914                       (memq (car-safe event) '(switch-frame select-window))))                       (memq (car-safe event) '(switch-frame select-window))))
915            (if (memq (car-safe event) '(switch-frame select-window))            (if (memq (car-safe event) '(switch-frame select-window))
# Line 997  at the same position." Line 1021  at the same position."
1021                               (= (window-start start-window)                               (= (window-start start-window)
1022                                  start-window-start)))                                  start-window-start)))
1023                  (if (and on-link                  (if (and on-link
1024                           (not end-point)                           (or (not end-point) (= end-point start-point))
1025                           (consp event)                           (consp event)
1026                           (or remap-double-click                           (or remap-double-click
1027                               (and                               (and

Legend:
Removed from v.1.268  
changed lines
  Added in v.1.269

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