Function: kfill:forward-line
kfill:forward-line is a byte-compiled function defined in kfill.el.
Signature
(kfill:forward-line &optional N)
Documentation
Move N lines forward (backward if N is negative) to the start of line.
If there isn’t room, go as far as possible (no error).
Return the count of lines left to move. If moving forward, that is N minus the number of lines moved; if backward, N plus the number moved.
Always return 0.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/kotl/kfill.el
;;; ************************************************************************
;;; Public functions
;;; ************************************************************************
(defun kfill:forward-line (&optional n)
"Move N lines forward (backward if N is negative) to the start of line.
If there isn’t room, go as far as possible (no error).
Return the count of lines left to move. If moving forward, that is N minus
the number of lines moved; if backward, N plus the number moved.
Always return 0."
(unless (integerp n)
(setq n 1))
(let ((start-line (line-number-at-pos)))
(forward-visible-line n)
(unless (< n 0)
(skip-chars-forward "\n\r"))
(if (>= n 0)
(- n (min n (- (line-number-at-pos) start-line)))
(- n (max n (- (line-number-at-pos) start-line))))))