branch: elpa/htmlize
commit 999eef200c6d7402b4b99230af870c85f46871ce
Author: Hrvoje Niksic <[email protected]>
Commit: Hrvoje Niksic <[email protected]>

    Support searching for any property change.
---
 htmlize.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/htmlize.el b/htmlize.el
index 39d0c0f..baa09ab 100644
--- a/htmlize.el
+++ b/htmlize.el
@@ -300,11 +300,15 @@ output.")
 (cond
  (htmlize-running-xemacs
   (defun htmlize-next-change (pos prop &optional limit)
-    (next-single-property-change pos prop nil (or limit (point-max)))))
+    (if prop
+        (next-single-property-change pos prop nil (or limit (point-max)))
+      (next-property-change pos nil (or limit (point-max))))))
  ((fboundp 'next-single-char-property-change)
   ;; GNU Emacs 21+
   (defun htmlize-next-change (pos prop &optional limit)
-    (next-single-char-property-change pos prop nil limit)))
+    (if prop
+        (next-single-char-property-change pos prop nil limit)
+      (next-char-property-change pos limit))))
  (t
   (error "htmlize requires next-single-property-change or \
 next-single-char-property-change")))

Reply via email to