Function: dframe-mouse-hscroll

dframe-mouse-hscroll is an interactive and byte-compiled function defined in dframe.el.gz.

Signature

(dframe-mouse-hscroll E)

Documentation

Read a mouse event E from the mode line, and horizontally scroll.

If the mouse is being clicked on the far left, or far right of the mode-line.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/dframe.el.gz
(defun dframe-mouse-hscroll (e)
  "Read a mouse event E from the mode line, and horizontally scroll.
If the mouse is being clicked on the far left, or far right of
the mode-line."
  (interactive "e")
  (let* ((x-point (car (nth 2 (car (cdr e)))))
	 (pixels-per-10-col (/ (* 10 (frame-pixel-width))
			       (frame-width)))
	 (click-col (1+ (/ (* 10 x-point) pixels-per-10-col))))
    (cond ((< click-col 3)
	   (scroll-left 2))
	  ((> click-col (- (window-width) 5))
	   (scroll-right 2))
	  (t (dframe-message
	      "Click on the edge of the mode line to scroll left/right")))))