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

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

[elpa] externals/hyperbole d256f195ee 11/19: Fix major issues with ibut:


From: ELPA Syncer
Subject: [elpa] externals/hyperbole d256f195ee 11/19: Fix major issues with ibut:create but some tests still fail
Date: Sun, 24 Jul 2022 16:57:38 -0400 (EDT)

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

    Fix major issues with ibut:create but some tests still fail
---
 hbut.el       | 14 ++++++++------
 hibtypes.el   |  4 ++--
 hmouse-drv.el |  7 ++++---
 3 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/hbut.el b/hbut.el
index 2f8568b60c..a391c8b86c 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:     17-Jul-22 at 16:26:56 by Bob Weiner
+;; Last-Mod:     23-Jul-22 at 01:57:12 by Bob Weiner
 ;;
 ;; Copyright (C) 1991-2022  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
@@ -1543,7 +1543,7 @@ associated arguments from the button."
          (funcall ibut-type-symbol))))))
 
 (cl-defun ibut:create (&optional &key name lbl-key lbl-start lbl-end
-                                loc categ actype args action)
+                                loc dir categ actype args action)
   "Return `hbut:current' symbol with attributes of implicit button at point.
 Return nil if no implicit button at point."
   ;; :args is ignored unless :categ is also given.
@@ -1555,7 +1555,7 @@ Return nil if no implicit button at point."
   (unless (or (eolp) (eobp))
     (let* ((types (htype:category 'ibtypes))
           ;; Global var used in (hact) function, don't delete.
-          (hrule:action 'actype:identity)
+          (hrule:action #'actype:identity)
           (name-start-end (ibut:label-p t nil nil t t))
           (ibpoint (point-marker))
           (itype)
@@ -1596,10 +1596,11 @@ Return nil if no implicit button at point."
          (hattr:set 'hbut:current 'lbl-key lbl-key))
        (hattr:set 'hbut:current 'loc (or loc (save-excursion
                                                (hbut:key-src 'full))))
+       (hattr:set 'hbut:current 'dir (or dir (hui:key-dir (current-buffer))))
        (when action
-         (hattr:set 'hbut:current 'action action))
-       (or args
-           (hattr:get 'hbut:current 'args)
+         (hattr:set 'hbut:current 'action action)
+         (unless args (setq args action)))
+       (or (hattr:get 'hbut:current 'args)
            (not (listp args))
            (progn
              (setq args (copy-sequence args))
@@ -1607,6 +1608,7 @@ Return nil if no implicit button at point."
                (setq args (cdr args)))
              (hattr:set 'hbut:current 'actype
                         (or
+                         actype
                          ;; Hyperbole action type
                          (symtable:actype-p (car args))
                          ;; Regular Emacs Lisp function symbol
diff --git a/hibtypes.el b/hibtypes.el
index a366ab30c2..384d0cd858 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    19-Sep-91 at 20:45:31
-;; Last-Mod:     17-Jul-22 at 23:19:27 by Bob Weiner
+;; Last-Mod:     23-Jul-22 at 01:30:20 by Bob Weiner
 ;;
 ;; Copyright (C) 1991-2022 Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
@@ -1370,7 +1370,7 @@ arg1 ... argN '>'.  For example, <mail nil 
\"user@somewhere.org\">."
     ;;     at the end of the buffer
     ;;     or is followed by a space, punctuation or grouping character.
     (when (and lbl-key (or (null (char-before start-pos))
-                            (memq (char-syntax (char-before start-pos)) '(?\  
?\> ?\( ?\))))
+                           (memq (char-syntax (char-before start-pos)) '(?\  
?\> ?\( ?\))))
                (not (memq (char-syntax (char-after (1+ start-pos))) '(?\  
?\>)))
                (or (null (char-after end-pos))
                    (memq (char-syntax (char-after end-pos)) '(?\  ?\> ?. ?\( 
?\)))
diff --git a/hmouse-drv.el b/hmouse-drv.el
index 5a1e952296..2e4246791e 100644
--- a/hmouse-drv.el
+++ b/hmouse-drv.el
@@ -3,7 +3,7 @@
 ;; Author:       Bob Weiner
 ;;
 ;; Orig-Date:    04-Feb-90
-;; Last-Mod:     17-Jul-22 at 23:15:34 by Bob Weiner
+;; Last-Mod:     23-Jul-22 at 01:57:43 by Bob Weiner
 ;;
 ;; Copyright (C) 1989-2021  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
@@ -856,8 +856,9 @@ frame instead."
           pred
           (if assist-flag "Assist" "Action")
           (if (hattr:get  'hbut:current 'actype)
-              (cons (hattr:get  'hbut:current 'actype)
-                    (hattr:get  'hbut:current 'args))
+              (or (hattr:get  'hbut:current 'action)
+                  (cons (hattr:get  'hbut:current 'actype)
+                        (hattr:get  'hbut:current 'args)))
             (hypb:format-quote (format "%s" hkey-action)))
           (current-buffer)
           major-mode



reply via email to

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