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

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

[elpa] externals/hyperbole 18612a743e 1/2: Fix ibuts not activating in p


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 18612a743e 1/2: Fix ibuts not activating in programming modes outside of comments
Date: Tue, 27 Jun 2023 03:58:35 -0400 (EDT)

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

    Fix ibuts not activating in programming modes outside of comments
---
 ChangeLog   |  6 +++++-
 hbut.el     | 17 ++++++++---------
 hibtypes.el |  7 ++++---
 hypb-ert.el |  8 ++------
 4 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f46e802793..5420334362 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
 2023-06-25  Bob Weiner  <rsw@gnu.org>
+* hbut.el (ibut:to-name, ibut:at-p, ibut:to-text): Remove test call to
+    'hbut:outside-comment-p' since ibuts don't have to be within programming
+comments.  This fixes ibtype 'hyperbole-run-test-definition' failing to match
+and thus action-key not running an ert def when pressed within a test def.
 
 * hibtypes.el (annot-bib): Fix missing check that annot-bib is between square
     brackets.
@@ -20,7 +24,7 @@
     'edit-flag'.
   hbut.el (ibut:operate): Add 2nd edit-flag parameter; when non-nil, means 
modifying
     an existing ibut at point.
-    
+
 2023-06-23  Mats Lidell  <matsl@gnu.org>
 
 * Makefile (LOAD_EL): Avoid the trailing quotation mark.
diff --git a/hbut.el b/hbut.el
index baa19c52bc..a5b737f6db 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:     24-Jun-23 at 13:09:26 by Bob Weiner
+;; Last-Mod:     26-Jun-23 at 00:04:54 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -1608,7 +1608,7 @@ excluding delimiters, not just one."
   ;; Since the Smart Keys handle end-of-line separately from whether
   ;; point is within an implicit button, always report not within one
   ;; when point is at the end of a line.  -- RSW, 02-16-2020
-  (unless (or (eolp) (hbut:outside-comment-p))
+  (unless (eolp)
     ;; Check for an implicit button at current point, record its
     ;; attributes in memory and return a button symbol for it.
     (when (ibut:create)
@@ -2588,12 +2588,11 @@ Return the symbol for the button if found, else nil."
                  (and lbl-key (equal at-lbl-key lbl-key)))
              (setq ibut 'hbut:current))
             ((and lbl-key (setq ibut (ibut:to lbl-key)))))
-       (when (not (hbut:outside-comment-p))
-        ;; Skip past any optional name and separators
-        (cond (name-start
-               (goto-char name-start)
-               (skip-chars-forward (regexp-quote ibut:label-start)))
-              ((ibut:at-to-name-p ibut))))
+       ;; Skip past any optional name and separators
+       (cond (name-start
+             (goto-char name-start)
+             (skip-chars-forward (regexp-quote ibut:label-start)))
+            ((ibut:at-to-name-p ibut)))
        ibut))
    lbl-key
    (current-buffer)))
@@ -2631,7 +2630,7 @@ Return the symbol for the button if found, else nil."
                      move-flag t))
               ((and name-key (setq ibut (ibut:to name-key)))
                (setq move-flag t)))
-        (when (and move-flag ibut (not (hbut:outside-comment-p)))
+        (when (and move-flag ibut)
           ;; Skip past any optional name and separators
           (if (setq start (hattr:get ibut 'lbl-start))
               (goto-char start)
diff --git a/hibtypes.el b/hibtypes.el
index a7136ad5db..2f9814b458 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:     25-Jun-23 at 13:27:34 by Bob Weiner
+;; Last-Mod:     25-Jun-23 at 23:04:09 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -395,9 +395,10 @@ must have an attached file."
                 (apply #'derived-mode-p '(c-mode objc-mode c++-mode java-mode 
markdown-mode org-mode))))
        (let ((ref (hattr:get 'hbut:current 'lbl-key))
             (lbl-start (hattr:get 'hbut:current 'lbl-start)))
-         (and ref (eq ?w (char-syntax (aref ref 0)))
-              (not (string-match "[#@]" ref))
+         (and ref
              lbl-start
+             (eq ?w (char-syntax (aref ref 0)))
+              (not (string-match "[#@]" ref))
              (save-excursion
                (goto-char lbl-start)
                (ibut:label-p t "[" "]" t))
diff --git a/hypb-ert.el b/hypb-ert.el
index 159384a039..3eccbff8fe 100644
--- a/hypb-ert.el
+++ b/hypb-ert.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell <matsl@gnu.org> and Bob Weiner <rsw@gnu.org>
 ;;
 ;; Orig-Date:    31-Mar-21 at 21:11:00
-;; Last-Mod:      7-May-23 at 20:23:27 by Bob Weiner
+;; Last-Mod:     25-Jun-23 at 23:20:29 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -29,11 +29,7 @@
 
 ;;; Code:
 
-(require 'lisp-mode)
-(require 'hload-path)
-(require 'ert)
-(require 'hbut)
-(require 'hargs)
+(mapc #'require '(lisp-mode hload-path ert hbut hargs))
 
 (defun hypb-ert-run-test (test-name)
   "Run the specified TEST-NAME ert test."



reply via email to

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