Subject: Re: bug#53981: 28.0.91; shortdoc: Add support for outline-minor-mode

From: Juri Linkov <[email-masked]>
Date: Wed, 09 Nov 2022 19:24:32 +0200

> These two loops cons a new string each iteration.  (So did the
> original code, but if we are touching this, might as well fix that.)

BTW, the patch uses functions from text-property-search.el.
But these useful functions are still not autoloaded.
Here is the patch to autoload them:

diff --git a/lisp/emacs-lisp/text-property-search.el b/lisp/emacs-lisp/text-property-search.el
index d41222bdbf1..7e78fdfe7d6 100644
--- a/lisp/emacs-lisp/text-property-search.el
+++ b/lisp/emacs-lisp/text-property-search.el
@@ -26,9 +26,12 @@
 
 (eval-when-compile (require 'cl-lib))
 
+;;;###autoload (autoload 'prop-match-beginning "text-property-search")
+;;;###autoload (autoload 'prop-match-end "text-property-search")
 (cl-defstruct (prop-match)
   beginning end value)
 
+;;;###autoload
 (defun text-property-search-forward (property &optional value predicate
                                               not-current)
   "Search for the next region of text where PREDICATE is true.
@@ -131,7 +134,7 @@ text-property--find-end-forward
                      :end end
                      :value (get-text-property start property))))
 
-
+;;;###autoload
 (defun text-property-search-backward (property &optional value predicate
                                                not-current)
   "Search for the previous region of text whose PROPERTY matches VALUE.
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 61a26b504c8..5a27dcd4c27 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -3284,10 +3284,6 @@ reorder-starters
 (defvar reorder-enders "[\u202C\u2069]+\\|\n"
   "Regular expression for characters that end forced-reordered text.")
 
-(autoload 'text-property-search-forward "text-property-search")
-(autoload 'prop-match-beginning "text-property-search")
-(autoload 'prop-match-end "text-property-search")
-
 (defun highlight-confusing-reorderings (beg end &optional remove)
   "Highlight text in region that might be bidi-reordered in suspicious ways.
 This command find and highlights segments of buffer text that could have
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index b57ad12986d..d0a14b0cebf 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -34,7 +34,6 @@
 
 (require 'pp)
 (require 'tabulated-list)
-(require 'text-property-search)
 (require 'fringe) ; for builds --without-x
 (eval-when-compile (require 'cl-lib))