emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/hyperbole 5247da9: ebut:program - Change to a function


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 5247da9: ebut:program - Change to a function from macro so 'args' are evaled
Date: Sun, 4 Jul 2021 11:57:10 -0400 (EDT)

branch: externals/hyperbole
commit 5247da94154f41e0fc74caea9c5b6ac3b4b1cf07
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>

    ebut:program - Change to a function from macro so 'args' are evaled
---
 ChangeLog |  4 ++++
 hbut.el   | 18 +++++++++---------
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5ff30be..fa512f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-07-04  Bob Weiner  <rsw@gnu.org>
+
+* hbut.el (ebut:program): Change to a function from a macro so 'args' are 
evaluated.
+
 2021-06-19  Mats Lidell  <matsl@gnu.org>
 
 * hui-menu.el (hyperbole-menubar-menu): Use easy-menu-add-item.
diff --git a/hbut.el b/hbut.el
index 7f48fb7..10d1299 100644
--- a/hbut.el
+++ b/hbut.el
@@ -410,7 +410,7 @@ button is found in the current buffer."
        "(ebut:operate): Operation failed.  Check button attribute permissions: 
%s"
        hattr:filename))))
 
-(defmacro ebut:program (label actype &rest args)
+(defun ebut:program (label actype &rest args)
   "Programmatically create an explicit Hyperbole button at point from LABEL, 
ACTYPE (action type), and optional actype ARGS.
 Insert LABEL text at point surrounded by <( )> delimiters, adding any
 necessary instance number of the button after the LABEL.  ACTYPE may
@@ -419,9 +419,9 @@ function, followed by a list of arguments for the actype, 
aside from
 the button LABEL which is automatically provided as the first argument.
 
 For interactive creation, use `hui:ebut-create' instead."
-  `(save-excursion
+  (save-excursion
      (let ((but-buf (current-buffer))
-          (actype-sym (intern-soft (concat "actypes::" (symbol-name 
,actype)))))
+          (actype-sym (intern-soft (concat "actypes::" (symbol-name actype)))))
       (hui:buf-writable-err but-buf "ebut-create")
       (condition-case err
          (progn
@@ -429,14 +429,14 @@ For interactive creation, use `hui:ebut-create' instead."
            (hattr:set 'hbut:current 'loc (hui:key-src but-buf))
            (hattr:set 'hbut:current 'dir (hui:key-dir but-buf))
             (if (or (and actype-sym (fboundp actype-sym))
-                   (functionp ,actype))
-               (hattr:set 'hbut:current 'actype ,actype)
-             (error "(,actype)"))
-           (hattr:set 'hbut:current 'args ',args)
-           (ebut:operate ,label nil))
+                   (functionp actype))
+               (hattr:set 'hbut:current 'actype actype)
+             (error (format "(%s)" actype)))
+           (hattr:set 'hbut:current 'args args)
+           (ebut:operate label nil))
        (error (hattr:clear 'hbut:current)
               (if (and (listp (cdr err)) (= (length (cdr err)) 1))
-                  (error (format "(ebut:program): actype arg must be a bound 
symbol (not a string): %s" ,actype))
+                  (error (format "(ebut:program): actype arg must be a bound 
symbol (not a string): %s" actype))
                 (error "(ebut:program): %s" err)))))))
 
 (defun    ebut:search (string out-buf &optional match-part)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]