branch: externals/hyperbole
commit 1b449389ab9099bc2cde75f2071e851c1c97bd0b
Merge: f66c215da1 d9f0782392
Author: Robert Weiner <r...@gnu.org>
Commit: GitHub <nore...@github.com>

    Merge pull request #720 from rswgnu/rsw
    
    hyrolo.el - disable hywiki-mode; hypb:in-string-p - save match data
---
 ChangeLog            | 8 ++++++++
 hypb.el              | 9 +++++----
 hyrolo.el            | 4 +++-
 hywiki.el            | 2 +-
 test/hywiki-tests.el | 8 ++++----
 5 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ad211c5cb9..e19aeca325 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,14 @@
 
 2025-04-27  Bob Weiner  <r...@gnu.org>
 
+* hypb.el (hypb:in-string-p): Add missing 'save-match-data' so when used with
+    another search, this does not overwrite the matches.  This fixes 
HyWikiWords
+    in yanked regions not highlighting.
+
+* hyrolo.el (hyrolo-grep-file): Disable 'hywiki-mode' highlighting when reading
+    in HyRolo search buffers to maintain speed and not have all the HyWikiWords
+    distracting from matches found in the *HyRolo* match buffer.
+
 * test/hywiki-tests.el (hywiki-tests--save-referent-keyseries-use-menu): 
Rewrite
     and enable this test.
 
diff --git a/hypb.el b/hypb.el
index 80aab6ae5d..af1dc10cb8 100644
--- a/hypb.el
+++ b/hypb.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:     6-Oct-91 at 03:42:38
-;; Last-Mod:     18-Apr-25 at 21:38:23 by Bob Weiner
+;; Last-Mod:     27-Apr-25 at 12:03:07 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -672,9 +672,10 @@ This will this install the Emacs helm package when needed."
     ;; Don't use `syntax-ppss' here as it fails to ignore backquoted
     ;; double quote characters in strings and doesn't work in
     ;; `change-log-mode' due to its syntax-table.
-    (and (cl-oddp (count-matches "\\(^\\|[^\\]\\)\"" (point-min) (point)))
-        (save-excursion (re-search-forward "\\(^\\|[^\\]\\)\"" nil t))
-        t)))
+    (save-match-data
+      (and (cl-oddp (count-matches "\\(^\\|[^\\]\\)\"" (point-min) (point)))
+          (save-excursion (re-search-forward "\\(^\\|[^\\]\\)\"" nil t))
+          t))))
 
 (defun hypb:indirect-function (obj)
   "Return the function at the end of OBJ's function chain.
diff --git a/hyrolo.el b/hyrolo.el
index 8a692451b5..ee39928599 100644
--- a/hyrolo.el
+++ b/hyrolo.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:     7-Jun-89 at 22:08:29
-;; Last-Mod:     19-Feb-25 at 21:41:13 by Bob Weiner
+;; Last-Mod:     27-Apr-25 at 11:12:58 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -1984,6 +1984,8 @@ Return number of matching entries found."
   (setq hyrolo-match-regexp pattern)
   ;;
   (let ((actual-buf)
+       ;; Temporarily disable hywiki-mode for speed
+       (hywiki-mode)
        ;; Temporarily disable magit-auto-revert-mode-enable-in-buffers for 
hyrolo
        ;; buffers; not needed and can slow/hang file loading
        (after-change-major-mode-hook
diff --git a/hywiki.el b/hywiki.el
index 8d4c53c70d..d3989eced4 100644
--- a/hywiki.el
+++ b/hywiki.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    21-Acpr-24 at 22:41:13
-;; Last-Mod:     27-Apr-25 at 14:35:33 by Mats Lidell
+;; Last-Mod:     27-Apr-25 at 12:19:38 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
diff --git a/test/hywiki-tests.el b/test/hywiki-tests.el
index ab452ea9d2..abb3edf385 100644
--- a/test/hywiki-tests.el
+++ b/test/hywiki-tests.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell
 ;;
 ;; Orig-Date:    18-May-24 at 23:59:48
-;; Last-Mod:     27-Apr-25 at 02:47:39 by Bob Weiner
+;; Last-Mod:     27-Apr-25 at 10:11:50 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -781,9 +781,9 @@ body B
             (save-buffer))
           (with-current-buffer (find-file-noselect wikipage)
             (insert "\
-WikiWord
-WikiWord#Asection
-WikiWord#Bsection-subsection
+* WikiWord
+* WikiWord#Asection
+* WikiWord#Bsection-subsection
 ")
             (save-buffer))
 

Reply via email to