emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master bc1a011 3/3: Further corrections for the text-property-search doc


From: Lars Ingebrigtsen
Subject: master bc1a011 3/3: Further corrections for the text-property-search doc strings
Date: Wed, 12 May 2021 10:18:02 -0400 (EDT)

branch: master
commit bc1a01172e2725503628914f019192c0e59260a3
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Further corrections for the text-property-search doc strings
    
    * lisp/emacs-lisp/text-property-search.el
    (text-property-search-forward): Correct doc string.
    (text-property-search-backward): Ditto.
---
 lisp/emacs-lisp/text-property-search.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/emacs-lisp/text-property-search.el 
b/lisp/emacs-lisp/text-property-search.el
index 49e196d..1f2dcfe 100644
--- a/lisp/emacs-lisp/text-property-search.el
+++ b/lisp/emacs-lisp/text-property-search.el
@@ -46,18 +46,19 @@ If PREDICATE is nil, a value will match if is not `equal' to
 VALUE.  Furthermore, the match region is ended if the value
 changes.  For instance, this means that if you loop with
 
-  (while (text-property-search-forward 'face)
+  (while (setq prop (text-property-search-forward 'face))
     ...)
 
 you will get all distinct regions with different `face' values in
-the buffer.
+the buffer, and the `prop' object will have the details about the
+match.
 
 If NOT-CURRENT is non-nil, the function will search for the first
 region that doesn't include point and has a value of PROPERTY
 that matches VALUE.
 
 If no matches can be found, return nil and don't move point.
-If found, move point to the start of the region and return a
+If found, move point to the end of the region and return a
 `prop-match' object describing the match.  To access the details
 of the match, use `prop-match-beginning' and `prop-match-end' for
 the buffer positions that limit the region, and
@@ -134,7 +135,7 @@ the buffer positions that limit the region, and
   "Search for the previous region of text whose PROPERTY matches VALUE.
 
 Like `text-property-search-forward', which see, but searches backward,
-and if a matching region is found, place point at its end."
+and if a matching region is found, place point at the start of the region."
   (interactive
    (list
     (let ((string (completing-read "Search for property: " obarray)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]