Function: ruler-mode-mouse-drag-any-column-iteration

ruler-mode-mouse-drag-any-column-iteration is a byte-compiled function defined in ruler-mode.el.gz.

Signature

(ruler-mode-mouse-drag-any-column-iteration WINDOW)

Documentation

Update the ruler while dragging the mouse.

WINDOW is the window where occurred the last down-mouse event. Return the symbol drag if the mouse has been dragged, or click if the mouse has been clicked.

Source Code

;; Defined in /usr/src/emacs/lisp/ruler-mode.el.gz
(defun ruler-mode-mouse-drag-any-column-iteration (window)
  "Update the ruler while dragging the mouse.
WINDOW is the window where occurred the last down-mouse event.
Return the symbol `drag' if the mouse has been dragged, or `click' if
the mouse has been clicked."
  (let ((drags 0)
        event)
    (track-mouse
      ;; Signal the display engine to freeze the mouse pointer shape.
      (setq track-mouse 'dragging)
      (while (mouse-movement-p (setq event (read--potential-mouse-event)))
        (setq drags (1+ drags))
        (when (eq window (posn-window (event-end event)))
          (ruler-mode-mouse-drag-any-column event)
          (force-mode-line-update))))
    (if (and (zerop drags) (eq 'click (car (event-modifiers event))))
        'click
      'drag)))