Rename newly-added eol/bol functions to pos-eol/pos-bol

* lisp/emacs-lisp/shortdoc.el (buffer):
* doc/lispref/positions.texi (Text Lines): Adjust.
* src/editfns.c (Fpos_bol): Rename from Fpos.
(Fpos_eol): Rename from Feol.
This commit is contained in:
Lars Ingebrigtsen 2022-08-21 14:04:52 +02:00
parent 8d4789c072
commit 2614e53216
4 changed files with 11 additions and 11 deletions

View file

@ -387,12 +387,12 @@ Return the position that @code{(end-of-line @var{count})}
would move to.
@end defun
@defun bol &optional count
@defun pos-bol &optional count
Like @code{line-beginning-position}, but ignores fields (and is more
efficient).
@end defun
@defun eol &optional count
@defun pos-eol &optional count
Like @code{line-end-position}, but ignores fields (and is more
efficient).
@end defun

View file

@ -2589,7 +2589,7 @@ patcomp.el, pc-mode.el, pc-select.el, s-region.el, and sregex.el.
* Lisp Changes in Emacs 29.1
+++
** New functions 'eol' and 'bol'.
** New functions 'pos-eol' and 'pos-bol'.
These are like 'line-end-position' and 'line-beginning-position'
(respectively), but ignore fields (and are more efficient).

View file

@ -941,10 +941,10 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
:eval (point-min))
(point-max
:eval (point-max))
(eol
:eval (eol))
(bol
:eval (bol))
(pos-eol
:eval (pos-eol))
(pos-bol
:eval (pos-bol))
(bolp
:eval (bolp))
(eolp

View file

@ -729,7 +729,7 @@ bol (Lisp_Object n, ptrdiff_t *out_count)
return charpos;
}
DEFUN ("bol", Fbol, Sbol, 0, 1, 0,
DEFUN ("pos-bol", Fpos_bol, Spos_bol, 0, 1, 0,
doc: /* Return the position of the first character on the current line.
With optional argument N, scan forward N - 1 lines first.
If the scan reaches the end of the buffer, return that position.
@ -784,7 +784,7 @@ eol (Lisp_Object n)
NULL);
}
DEFUN ("eol", Feol, Seol, 0, 1, 0,
DEFUN ("pos-eol", Fpos_eol, Spos_eol, 0, 1, 0,
doc: /* 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.
@ -4642,8 +4642,8 @@ with an optional argument LOCK non-nil. */);
defsubr (&Sline_beginning_position);
defsubr (&Sline_end_position);
defsubr (&Sbol);
defsubr (&Seol);
defsubr (&Spos_bol);
defsubr (&Spos_eol);
defsubr (&Ssave_excursion);
defsubr (&Ssave_current_buffer);