Skip to content

How to check that we have reached the end of buffer in Emacs Lisp?

(while (not (eobp))
  (message "%s: %s"
           (line-number-at-pos)
           (buffer-substring-no-properties (point-at-bol) (point-at-eol)))
  (forward-line))