summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2020-10-30 12:48:30 +0100
committerStefan Kangas <stefan@marxist.se>2020-10-30 13:23:31 +0100
commitb295174210465c4285729c67ec014e0f5b53f741 (patch)
treeee29a01828bedfbd902278e953ce38541923add5 /lisp/emacs-lisp
parentdaa21fb895c378674238f0f0a2492d93234901db (diff)
downloademacs-b295174210465c4285729c67ec014e0f5b53f741.tar.gz
emacs-b295174210465c4285729c67ec014e0f5b53f741.tar.bz2
emacs-b295174210465c4285729c67ec014e0f5b53f741.zip
Clarify point position after text-property-search
* lisp/emacs-lisp/text-property-search.el (text-property-search-forward, text-property-search-backward): Doc fix to clarify placement of point after search. * test/lisp/emacs-lisp/text-property-search-tests.el (text-property-search--pos-test): New defun. (text-property-search-forward-point-at-beginning) (text-property-search-backward-point-at-end): New test.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/text-property-search.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/text-property-search.el b/lisp/emacs-lisp/text-property-search.el
index 61bd98d3cfe..d7dc7da7c18 100644
--- a/lisp/emacs-lisp/text-property-search.el
+++ b/lisp/emacs-lisp/text-property-search.el
@@ -34,11 +34,11 @@
"Search for the next region of text whose PROPERTY matches VALUE.
If not found, return nil and don't move point.
-If found, move point to 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 `prop-match-value' for the
-value of PROPERTY in the region.
+If found, move point to the start 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
+`prop-match-value' for the value of PROPERTY in the region.
PREDICATE is used to decide whether a value of PROPERTY should be
considered as matching VALUE.
@@ -125,7 +125,7 @@ that matches VALUE."
"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, moves point to its beginning."
+and if a matching region is found, place point at its end."
(interactive
(list
(let ((string (completing-read "Search for property: " obarray)))