[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 577c3c1b13 1/8: Fix Action Key not highlighti
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 577c3c1b13 1/8: Fix Action Key not highlighting matching HTML tag pairs |
Date: |
Tue, 10 Sep 2024 06:58:19 -0400 (EDT) |
branch: externals/hyperbole
commit 577c3c1b13f4f25408efe68ec241040ad4c017f7
Author: bw <rsw@gnu.org>
Commit: bw <rsw@gnu.org>
Fix Action Key not highlighting matching HTML tag pairs
Fix hyperbole.texi pylib defact doc in manual.
---
ChangeLog | 10 ++++++++++
hui-select.el | 53 ++++++++++++++++++++++++++++-------------------------
man/hyperbole.texi | 6 +++---
3 files changed, 41 insertions(+), 28 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9a4c5c60c8..02dbbe1f9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-09-02 Bob Weiner <rsw@gnu.org>
+
+* man/hyperbole.texi (Action Button Link Types): Change PYTHONLIBPATH to
+ PYTHONPATH to match the example definition of 'pylib' in the 'defal'
+ macro documentation.
+
+* hui-select.el (hui-select-delimited-thing-call): FIX: Add setting of
+ missing 'hui-select-syntax-table' that was preventing the Action
+ Key from selecting markup pairs in HTML/Web modes.
+
2024-09-01 Bob Weiner <rsw@gnu.org>
* man/dir (File): Narrow width to better fit with out Info entries.
diff --git a/hui-select.el b/hui-select.el
index 1ea2017594..988d880de2 100644
--- a/hui-select.el
+++ b/hui-select.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 19-Oct-96 at 02:25:27
-;; Last-Mod: 18-Aug-24 at 09:44:46 by Mats Lidell
+;; Last-Mod: 2-Sep-24 at 19:32:34 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -789,14 +789,13 @@ The character at POS is selected if no other thing is
matched."
(- (cdr region) (car region)))
(< region-size min-region))
(setq min-region region-size
- result
- (list
- ;; The actual selection type is
- ;; sometimes different than the one we
- ;; originally tried, so recompute it here.
- (car (assq hui-select-previous
- hui-select-bigger-alist))
- (car region) (cdr region)))))
+ result (list
+ ;; The actual selection type is
+ ;; sometimes different than the one we
+ ;; originally tried, so recompute it here.
+ (car (assq hui-select-previous
+ hui-select-bigger-alist))
+ (car region) (cdr region)))))
hui-select-bigger-alist)
(if result
;; Returns hui-select-region
@@ -841,7 +840,7 @@ Typically:
If `hui-select-char-p' is set non-nil, then as a fallback, the
character at POS will be selected.
-If an error occurs during syntax scanning, it returns nil."
+If an error occurs during syntax scanning, return nil."
(interactive "d")
(setq hui-select-previous 'char)
(if (save-excursion (goto-char pos) (eolp))
@@ -858,11 +857,11 @@ If an error occurs during syntax scanning, it returns
nil."
(defun hui-select-at-delimited-thing-p ()
"Return non-nil if point is at a delimited thing, else nil.
-A delimited tings is a markup pair, list, array/vector, set,
+A delimited thing is a markup pair, list, array/vector, set,
comment or string. The non-nil value returned is the function to
call to select that syntactic unit.
-Ignores any match if on an Emacs button and instead returns nil."
+Ignore any match if on an Emacs button and instead return nil."
(unless (button-at (point))
(setq hkey-value (hui-select-delimited-thing-call #'hui-select-at-p))
(cond ((eq hkey-value 'hui-select-punctuation)
@@ -975,19 +974,23 @@ call to select that syntactic unit."
(unless (and (memq major-mode hui-select-ignore-quoted-sexp-modes)
;; Ignore quoted identifier sexpressions, like #'function
(char-after) (memq (char-after) '(?# ?\')))
- (let ((hui-select-char-p)
- (hui-select-whitespace)
- (hui-select-syntax-alist '((?\" . hui-select-string)
- (?\( . hui-select-sexp-start)
- (?\$ . hui-select-sexp-start)
- (?\' . hui-select-sexp-start)
- (?\) . hui-select-sexp-end)
- (?\< . hui-select-comment)
- ;; Punctuation needed to match
- ;; multi-char comment delimiters
- (?\. . hui-select-punctuation))))
- (hui-select-reset)
- (funcall func))))
+ (with-syntax-table
+ (if (memq major-mode hui-select-ignore-quoted-sexp-modes)
+ (syntax-table)
+ hui-select-syntax-table)
+ (let ((hui-select-char-p)
+ (hui-select-whitespace)
+ (hui-select-syntax-alist '((?\" . hui-select-string)
+ (?\( . hui-select-sexp-start)
+ (?\$ . hui-select-sexp-start)
+ (?\' . hui-select-sexp-start)
+ (?\) . hui-select-sexp-end)
+ (?\< . hui-select-comment)
+ ;; Punctuation needed to match
+ ;; multi-char comment delimiters
+ (?\. . hui-select-punctuation))))
+ (hui-select-reset)
+ (funcall func)))))
(defun hui-select-region-bigger-p (old-region new-region)
"Non-nil means the new region is bigger than the old region.
diff --git a/man/hyperbole.texi b/man/hyperbole.texi
index 2813ce4e22..e40ee134a5 100644
--- a/man/hyperbole.texi
+++ b/man/hyperbole.texi
@@ -7,7 +7,7 @@
@c Author: Bob Weiner
@c
@c Orig-Date: 6-Nov-91 at 11:18:03
-@c Last-Mod: 1-Sep-24 at 20:28:29 by Bob Weiner
+@c Last-Mod: 2-Sep-24 at 19:50:16 by Bob Weiner
@c %**start of header (This is for running Texinfo on a region.)
@setfilename hyperbole.info
@@ -7468,11 +7468,11 @@ button is activated and does one of four things with
LINK-EXPR:
@item invokes a function or action type of one argument, the button text sans
the function name, to display it.
@end enumerate
-For example, if you use Python and have a @samp{PYTHONLIBPATH} environment
+For example, if you use Python and have a @samp{PYTHONPATH} environment
variable, then pressing @bkbd{C-x C-e} @code{eval-last-sexp} after
this expression:
-@code{(defal pylib "$@{PYTHONLIBPATH@}/%s")}
+@code{(defal pylib "$@{PYTHONPATH@}/%s")}
@noindent
defines a new action button link type called ’pylib’ whose buttons
- [elpa] externals/hyperbole updated (25ad337b6b -> 246ab46e65), ELPA Syncer, 2024/09/10
- [elpa] externals/hyperbole f68bf1bab5 3/8: Merge branch 'master' of hyperbole into rsw, ELPA Syncer, 2024/09/10
- [elpa] externals/hyperbole 577c3c1b13 1/8: Fix Action Key not highlighting matching HTML tag pairs,
ELPA Syncer <=
- [elpa] externals/hyperbole d4fd2ad38b 2/8: Merge branch 'rsw' hyperbole into rsw, ELPA Syncer, 2024/09/10
- [elpa] externals/hyperbole 2073097fc2 6/8: Merge pull request #587 from rswgnu/rsw, ELPA Syncer, 2024/09/10
- [elpa] externals/hyperbole bf64a07549 7/8: hywiki.el - When exporting a HyWiki mark all broken links, ELPA Syncer, 2024/09/10
- [elpa] externals/hyperbole 3239a77990 4/8: Cust/Highlight-Menu-Keys-Toggle - add this menu item, ELPA Syncer, 2024/09/10
- [elpa] externals/hyperbole 246ab46e65 8/8: Merge pull request #588 from rswgnu/rsw, ELPA Syncer, 2024/09/10
- [elpa] externals/hyperbole cede541e53 5/8: hui-select.el - Fix # in syntax-table to be punctuation, ELPA Syncer, 2024/09/10