branch: externals/hyperbole
commit e7e1b54e04579bc795ea11931272f3dac85ff576
Merge: 2b998ab029 fa82d4327b
Author: Robert Weiner <[email protected]>
Commit: GitHub <[email protected]>
Merge branch 'master' into rsw
---
ChangeLog | 7 +++++++
hproperty.el | 10 +++++-----
hywiki.el | 2 +-
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d82a15bddb..9f4094c69c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,13 @@
(hywiki-get-file): Fix to handle #section suffix which fixes
navigating to sections from HyWikiWord#section links.
+2024-12-27 Mats Lidell <[email protected]>
+
+* hywiki.el (hywiki-add-to-referent): Use when-let*.
+
+* hproperty.el (hproperty:char-property-start)
+ (hproperty:char-property-end): Use when-let*.
+
2024-12-27 Bob Weiner <[email protected]>
* test/hywiki-tests.el (hywiki-tests--add-activity,
diff --git a/hproperty.el b/hproperty.el
index 5ca2c3d2f7..0903a0aff1 100644
--- a/hproperty.el
+++ b/hproperty.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 21-Aug-92
-;; Last-Mod: 17-Nov-24 at 10:31:59 by Bob Weiner
+;; Last-Mod: 27-Dec-24 at 23:15:05 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -283,8 +283,8 @@ See `hproperty:but-get'."
(defun hproperty:char-property-start (pos property value)
"From POS, return the start of text PROPERTY with VALUE overlapping POS.
Otherwise, return nil. Value must be a symbol."
- (when-let ((val (hproperty:char-property-contains-p pos property value))
- (prev pos))
+ (when-let* ((val (hproperty:char-property-contains-p pos property value))
+ (prev pos))
;; Can't use `previous-single-char-property-change' below
;; because it checks for any change in the property value, not
;; just if the property contains the value desired.
@@ -296,8 +296,8 @@ Otherwise, return nil. Value must be a symbol."
(defun hproperty:char-property-end (pos property value)
"From POS, return the end of text PROPERTY with VALUE overlapping POS.
Otherwise, return nil. Value must be a symbol."
- (when-let ((val (hproperty:char-property-contains-p pos property value))
- (next pos))
+ (when-let* ((val (hproperty:char-property-contains-p pos property value))
+ (next pos))
;; Can't use `next-single-char-property-change' below
;; because it checks for any change in the property value, not
;; just if the property contains the value desired.
diff --git a/hywiki.el b/hywiki.el
index 8eedc487fc..ecfd552a9b 100644
--- a/hywiki.el
+++ b/hywiki.el
@@ -1169,7 +1169,7 @@ calling this function."
"Display WIKIWORD referent and insert TEXT at POSITION.
Create page if it does not exist. If WIKIWORD is invalid, return
nil, else return '(page . \"<page-file-path>\")."
- (when-let ((referent (hywiki-add-page wikiword)))
+ (when-let* ((referent (hywiki-add-page wikiword)))
(hywiki-find-referent wikiword)
(barf-if-buffer-read-only)
(save-excursion