emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/mouse.el


From: Kim F . Storm
Subject: [Emacs-diffs] Changes to emacs/lisp/mouse.el
Date: Tue, 22 Feb 2005 04:42:06 -0500

Index: emacs/lisp/mouse.el
diff -c emacs/lisp/mouse.el:1.266 emacs/lisp/mouse.el:1.267
*** emacs/lisp/mouse.el:1.266   Wed Feb  9 15:50:41 2005
--- emacs/lisp/mouse.el Tue Feb 22 09:42:06 2005
***************
*** 769,774 ****
--- 769,776 ----
  
  (defun mouse-on-link-p (pos)
    "Return non-nil if POS is on a link in the current buffer.
+ POS must be a buffer position in the current buffer or an mouse
+ event location in the selected window, see `event-start'.
  
  A clickable link is identified by one of the following methods:
  
***************
*** 787,793 ****
  
  - If the value is a function, FUNC, POS is inside a link if
  the call \(FUNC POS) returns non-nil.  Return the return value
! from that call.
  
  - Otherwise, return the value itself.
  
--- 789,795 ----
  
  - If the value is a function, FUNC, POS is inside a link if
  the call \(FUNC POS) returns non-nil.  Return the return value
! from that call.  Arg is \(posn-point POS) if POS is a mouse event,
  
  - Otherwise, return the value itself.
  
***************
*** 803,819 ****
  
  - Otherwise, the mouse-1 event is translated into a mouse-2 event
  at the same position."
!   (let ((action
!        (or (get-char-property pos 'follow-link)
!            (save-excursion
!              (goto-char pos)
!              (key-binding [follow-link] nil t)))))
!     (cond
!      ((eq action 'mouse-face)
!       (and (get-char-property pos 'mouse-face) t))
!      ((functionp action)
!       (funcall action pos))
!      (t action))))
  
  (defun mouse-drag-region-1 (start-event)
    (mouse-minibuffer-check start-event)
--- 805,826 ----
  
  - Otherwise, the mouse-1 event is translated into a mouse-2 event
  at the same position."
!   (if (consp pos)
!       (setq pos (and (eq (selected-window) (posn-window pos))
!                    (posn-point pos))))
!   (when pos
!     (let ((action
!          (or (get-char-property pos 'follow-link)
!              (save-excursion
!                (goto-char pos)
!                (key-binding [follow-link] nil t)))))
!       (cond
!        ((eq action 'mouse-face)
!       (and (get-char-property pos 'mouse-face) t))
!        ((functionp action)
!       (funcall action pos))
!        (t action)))))
! 
  
  (defun mouse-drag-region-1 (start-event)
    (mouse-minibuffer-check start-event)
***************
*** 831,837 ****
                     (nth 3 bounds)
                   ;; Don't count the mode line.
                   (1- (nth 3 bounds))))
!        on-link remap-double-click
         (click-count (1- (event-click-count start-event))))
      (setq mouse-selection-click-count click-count)
      (setq mouse-selection-click-count-buffer (current-buffer))
--- 838,846 ----
                     (nth 3 bounds)
                   ;; Don't count the mode line.
                   (1- (nth 3 bounds))))
!        (on-link (and mouse-1-click-follows-link
!                      (eq start-window (selected-window))))
!        remap-double-click
         (click-count (1- (event-click-count start-event))))
      (setq mouse-selection-click-count click-count)
      (setq mouse-selection-click-count-buffer (current-buffer))
***************
*** 841,847 ****
      (if (< (point) start-point)
        (goto-char start-point))
      (setq start-point (point))
!     (setq on-link (and mouse-1-click-follows-link
                       (mouse-on-link-p start-point)))
      (setq remap-double-click (and on-link
                                  (eq mouse-1-click-follows-link 'double)
--- 850,856 ----
      (if (< (point) start-point)
        (goto-char start-point))
      (setq start-point (point))
!     (setq on-link (and on-link
                       (mouse-on-link-p start-point)))
      (setq remap-double-click (and on-link
                                  (eq mouse-1-click-follows-link 'double)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]