Function: smart-scroll-up

smart-scroll-up is an interactive and byte-compiled function defined in hmouse-drv.el.

Signature

(smart-scroll-up)

Documentation

Scroll up according to value of smart-scroll-proportional.

If smart-scroll-proportional is nil or if point is on the top window line, scroll up (forward) a windowful. Otherwise, tyr to bring current line to the top of the window. Leave point at end of line and return t if scrolled, nil if not.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hmouse-drv.el
(defun smart-scroll-up ()
  "Scroll up according to value of smart-scroll-proportional.
If smart-scroll-proportional is nil or if point is on the top
window line, scroll up (forward) a windowful.  Otherwise, tyr to
bring current line to the top of the window.  Leave point at end
of line and return t if scrolled, nil if not."
  (interactive)
  (let ((rtn t))
    (if smart-scroll-proportional
	;; If selected line is already first in window, then scroll forward a
	;; windowful, otherwise make it first in window.
	(if (<= (point) (save-excursion
			  (goto-char (window-start))
			  (end-of-line) (point)))
	    (if (pos-visible-in-window-p (point-max))
		(setq rtn nil)
	      (scroll-up))
	  (recenter 0))
      (if (pos-visible-in-window-p (point-max))
	  (setq rtn nil)
	(scroll-up)))
    (end-of-line)
    (unless rtn
      (beep)
      (message "End of buffer"))
    rtn))