[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 7d485ab5ff 136/143: hbut:act-label: Add to ma
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 7d485ab5ff 136/143: hbut:act-label: Add to match same func for ebuts and ibuts |
Date: |
Mon, 19 Feb 2024 15:59:27 -0500 (EST) |
branch: externals/hyperbole
commit 7d485ab5ff23f448dd6191253d7f12f0768a7d59
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
hbut:act-label: Add to match same func for ebuts and ibuts
---
ChangeLog | 4 ++++
hbut.el | 23 +++++++++++++++++------
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index af5219e739..c096f1508d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-02-12 Bob Weiner <rsw@gnu.org>
+
+* hbut.el (hbut:act-label): Add to match same func for ebuts and ibuts.
+
2024-02-12 Mats Lidell <matsl@gnu.org>
* test/hyrolo-tests.el (hyrolo-tests--modify-test-data): Helper for
diff --git a/hbut.el b/hbut.el
index e1884e862e..6131e0ca52 100644
--- a/hbut.el
+++ b/hbut.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 18-Sep-91 at 02:57:09
-;; Last-Mod: 11-Feb-24 at 23:43:08 by Mats Lidell
+;; Last-Mod: 12-Feb-24 at 22:12:59 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -132,7 +132,7 @@ Default is the symbol hbut:current."
(setq ebut 'hbut:current))
(if (ebut:is-p ebut)
(hbut:act ebut)
- (error "(ebut:act): Expected an ebut but got a but of type %s" (hattr:get
ebut 'categ))))
+ (hypb:error "(ebut:act): Expected an ebut, instead given: `%s'" ebut)))
(defun ebut:act-label (label)
"Activate Hyperbole explicit button with LABEL from the current buffer."
@@ -143,7 +143,7 @@ Default is the symbol hbut:current."
(but (ebut:get lbl-key)))
(if but
(hbut:act but)
- (error "(ebut:act-label): No explicit button labeled: %s" label))))
+ (hypb:error "(ebut:act-label): No explicit button labeled: `%s'"
label))))
(defun ebut:alist (&optional file)
"Return alist of ebuts in FILE or the current buffer.
@@ -1082,7 +1082,18 @@ Default is the symbol hbut:current."
((and hbut (symbolp hbut))
(hypb:error "(hbut:act): Symbol, %s, has invalid Hyperbole button
attributes:\n %S" hbut (hattr:list hbut)))
(t
- (hypb:error "(hbut:act): Invalid Hyperbole button: %s" hbut))))
+ (hypb:error "(hbut:act): Expected an ibut, instead given: `%s'"
hbut))))
+
+(defun hbut:act-label (label)
+ "Activate Hyperbole implicit button with <[LABEL]> from the current buffer."
+ (interactive (list (hargs:read-match "Activate labeled Hyperbole button: "
+ (nconc (ebut:alist) (ibut:alist))
+ nil t nil 'hbut)))
+ (let* ((lbl-key (hbut:label-to-key label))
+ (but (hbut:get lbl-key)))
+ (if but
+ (hbut:act but)
+ (hypb:error "(hbut:act-label): No implicit button labeled: `%s'"
label))))
(defun hbut:action (hbut)
"Return appropriate action name/function for Hyperbole button symbol HBUT."
@@ -1714,7 +1725,7 @@ Default is the symbol hbut:current."
(setq ibut 'hbut:current))
(if (ibut:is-p ibut)
(hbut:act ibut)
- (error "(ebut:act): Expected an ibut but got a but of type %s" (hattr:get
ibut 'categ))))
+ (hypb:error "(ibut:act): Expected an ibut, instead given: `%s'" ibut)))
(defun ibut:act-label (label)
"Activate Hyperbole implicit button with <[LABEL]> from the current buffer."
@@ -1725,7 +1736,7 @@ Default is the symbol hbut:current."
(but (ibut:get lbl-key)))
(if but
(hbut:act but)
- (error "(ibut:act-label): No implicit button labeled: %s" label))))
+ (hypb:error "(ibut:act-label): No implicit button labeled: `%s'"
label))))
(defun ibut:alist (&optional file)
"Return alist of labeled ibuts in FILE or the current buffer.
- [elpa] externals/hyperbole 327f53f078 069/143: Mock y-or-n-p to avoid being prompted (#433), (continued)
- [elpa] externals/hyperbole 327f53f078 069/143: Mock y-or-n-p to avoid being prompted (#433), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole e88a3873ed 073/143: htype:def-symbol, htype:names, actype:def-symbol - Call update, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole eeb6aacd9f 075/143: Add more hyrolo show, hide and movement tests (#436), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 47d87c252f 113/143: HyRolo - resolve all outline movement issues and tests, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 7b50db7eb0 085/143: Matsl rsw forward backward same level tests (#443), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 3d80bcbaf4 109/143: Merge branch 'rsw' of hyperbole into rsw, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 1078846a45 120/143: Update generation of README.md.html for increased reliability, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 970a5573f3 133/143: Merge branch 'rsw' into matsl-rsw-add-top-view-n-overview-tests, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 7c7aae7206 052/143: Add edit entry test, fix regular expressions, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 6009912456 128/143: Add type of but in error message, renamed but parameter, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 7d485ab5ff 136/143: hbut:act-label: Add to match same func for ebuts and ibuts,
ELPA Syncer <=
- [elpa] externals/hyperbole 9a39300fcb 135/143: Merge branch 'rsw' of hyperbole into rsw, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole d55d57664c 139/143: Remove ad hoc flycheck warnings (#468), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole ce463d27c9 143/143: Merge to rsw branch in prep for V8.0.2pre release, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 21c93a0c70 137/143: Reorder load of `org-macs', ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole da8fd61747 099/143: Remove package-lint dependency and string-replace compatibility code, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 74ba1fd580 104/143: Cleanup of flycheck/flymake info and warning messages (#449), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 9e77bdf62e 108/143: Fix cyclic call bug that made Elisp lookups slow in ChangeLog mode, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole dd2e0884ee 100/143: Merge pull request #450 from rswgnu/matsl-rsw-cleanup-package-lint-dependencies, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 871391f368 103/143: Add test for hargs:sexpression-p (#451), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 4291c14138 115/143: Add hyrolo reveal mode test (#459), ELPA Syncer, 2024/02/19