branch: externals/hyperbole
commit bc0c5b9086977bcc93f29dac1c67131547dc19f1
Author: bw <[email protected]>
Commit: bw <[email protected]>
HyRolo - if hyrolo-file-list is set on load, initialize its cache
---
ChangeLog | 6 ++++++
hyrolo.el | 11 +++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 94821e93a2..4ac96cdb42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-12-31 Bob Weiner <[email protected]>
+
+* hyrolo.el (hyrolo-file-list): Add 'hyrolo-set-file-list' after loading the
hyrolo
+ library (at the end of the file) if 'hyrolo-file-list' has been set by the
+ user or the customization system prior to loading HyRolo.
+
2023-12-30 Bob Weiner <[email protected]>
* hyrolo.el (hyrolo-show-levels): Add top-level save-excursion so point does
diff --git a/hyrolo.el b/hyrolo.el
index 17396613d6..54bd1e4a55 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: 30-Dec-23 at 23:23:18 by Bob Weiner
+;; Last-Mod: 31-Dec-23 at 11:53:19 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -349,7 +349,7 @@ matches."
(defvar hyrolo--expanded-file-list nil
"List of hyrolo files after directory and file wildcard expansions.
-Hyrolo sets this internally; never set it yourself.")
+HyRolo sets this internally; never set it outside of this library.")
(defconst hyrolo-match-regexp nil
"Last regular expression used to search the hyrolo.
@@ -3026,6 +3026,13 @@ Add `hyrolo-hdr-regexp' to `hyrolo-hdr-and-entry-regexp'
and `outline-regexp'."
(reveal-close-old-overlays old-ols)))
t)))))
+;;; ************************************************************************
+;;; hyrolo-file-list - initialize cache if this is already set when loading
+;;; ************************************************************************
+
+(when (and hyrolo-file-list (null hyrolo--expanded-file-list))
+ (hyrolo-set-file-list 'hyrolo-file-list hyrolo-file-list))
+
(provide 'hyrolo)
;;; hyrolo.el ends here