Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2026-06-07 Bob Weiner <rsw@gnu.org>

* hbut.el (ibut:to-text): Fix missing let of 'name-end' and assign a value.

2026-06-07 Mats Lidell <matsl@gnu.org>

* test/hibtypes-tests.el (hibtypes-tests--hib-python-traceback):
Expand Down
32 changes: 16 additions & 16 deletions hbut.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 18-Sep-91 at 02:57:09
;; Last-Mod: 7-Jun-26 at 11:26:22 by Bob Weiner
;; Last-Mod: 7-Jun-26 at 16:50:26 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -2977,27 +2977,27 @@ Return the symbol for the button if found, else nil."
(lambda (lbl-key _buffer _key-src)
(let* ((opoint (point))
move-flag
name-end
start
ibut)
;; Do not move point if it is already in the text of an
;; implicit button matching LBL-KEY. If on the name of
;; the same button, move into the text of the button.
(when (and lbl-key (setq ibut (ibut:to lbl-key)))
(setq move-flag t))

(when (and move-flag ibut)
;; Skip past any optional name and separators
(if (setq start (hattr:get ibut 'lbl-start))
(goto-char start)
(when name-end
(goto-char name-end)
(if (looking-at ibut:label-separator-regexp)
;; Move past up to 2 possible characters of ibut
;; delimiters to ensure are inside the ibut name; this
;; prevents recognizing labeled, delimited ibuts of a
;; single character since no one should need that.
(goto-char (min (+ 2 (match-end 0)) (point-max)))
(goto-char opoint)))))
(setq move-flag t)
(when (and move-flag ibut)
;; Skip past any optional name and separators
(if (setq start (hattr:get ibut 'lbl-start))
(goto-char start)
(when (setq name-end (hattr:get ibut 'name-end))
(goto-char name-end)
(if (looking-at ibut:label-separator-regexp)
;; Move past up to 2 possible characters of ibut
;; delimiters to ensure are inside the ibut name; this
;; prevents recognizing labeled, delimited ibuts of a
;; single character since no one should need that.
(goto-char (min (+ 2 (match-end 0)) (point-max)))
(goto-char opoint))))))
ibut))
lbl-key
(current-buffer)))
Expand Down