Function: pos-eol

pos-eol is a function defined in editfns.c.

Signature

(pos-eol &optional N)

Documentation

Return the position of the last character on the current line.

With argument N not nil or 1, move forward N - 1 lines first. If scan reaches end of buffer, return that position.

This function ignores text display directionality; it returns the position of the last character in logical order, i.e. the largest character position on the line.

This function does not move point. Also see line-end-position.

Other relevant functions are documented in the buffer group.

View in manual

Probably introduced at or before Emacs version 29.1.

Shortdoc

;; buffer
(pos-eol)
    => 2729

Source Code

// Defined in /usr/src/emacs/src/editfns.c
{
  return make_fixnum (eol (n));
}