Function: scroll-bar-scroll-up

scroll-bar-scroll-up is an interactive and byte-compiled function defined in scroll-bar.el.gz.

Signature

(scroll-bar-scroll-up EVENT)

Documentation

Scroll the line next to the scroll bar click to the top of the window.

EVENT should be a scroll bar click.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/scroll-bar.el.gz
(defun scroll-bar-scroll-up (event)
  "Scroll the line next to the scroll bar click to the top of the window.
EVENT should be a scroll bar click."
  (interactive "e")
  (let* ((end-position (event-end event))
	 (window (nth 0 end-position))
	 (before-scroll))
    (with-current-buffer (window-buffer window)
      (setq before-scroll point-before-scroll))
    (unwind-protect
	(save-selected-window
	  (let ((portion-whole (nth 2 end-position)))
	    (select-window window 'mark-for-redisplay)
	    (setq before-scroll
		  (or before-scroll (point)))
	    (scroll-up
	     (scroll-bar-scale portion-whole (1- (window-height)))))
	  (sit-for 0))
      (with-current-buffer (window-buffer window)
	(setq point-before-scroll before-scroll)))))