[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re-search-forward in An Introduction to Programming in Emacs Lisp
From: |
Toshi Umehara |
Subject: |
re-search-forward in An Introduction to Programming in Emacs Lisp |
Date: |
Sun, 24 Mar 2024 11:17:04 +0900 |
Hello
I have noticed re-search-forward function explanation in "An
Introduction to Programming in Emacs Lisp" does not precisely mention
the movement of point when its third argument is not specified nil or t,
but is specified another value such as 'move [1]. The introduction just
says " If the search is successful, it leaves point immediately after
the last character in the target.", which is true when the third agument
is nil or t.
"Emacs Lisp" manual explains its third argument about cases where it is
nil, t or anything else [2]. When it's specified as anything else, it
explains "Move point to limit (or the end of the accessible portion of
the buffer) and return nil." Therefore, when the third argument is
specified as 'move, even if the search fails and returns nil, the point
moves.
This function is requently used for point movement, and "An Introduction
to Programming in Emacs Lisp" should mention this point movement
behavior.
I could not find where to report this proposal about "An
Introduction to Programming in Emacs Lisp". Does someone have any idea
how to propose modification to the introduction?
Thanks
Reference
[1]
https://www.gnu.org/software/emacs/manual/html_node/eintr/re_002dsearch_002dforward.html
[2] https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Search.html
--
Toshi (Toshihiro Umehara)
- re-search-forward in An Introduction to Programming in Emacs Lisp,
Toshi Umehara <=