branch: externals/hyperbole commit 2c5f1a49397b4c9ca099a1abfefdd709174a1dcb Author: bw <r...@gnu.org> Commit: bw <r...@gnu.org>
hynote.el, klink.el - Add (require 'hbut) to quiet warnings --- hynote.el | 3 ++- kotl/klink.el | 10 ++++++---- man/hyperbole.texi | 23 ++++++++++++----------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/hynote.el b/hynote.el index 8f16206fd5..0bbe4bc258 100644 --- a/hynote.el +++ b/hynote.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 23-Jun-24 at 12:50:37 -;; Last-Mod: 25-Jun-24 at 02:39:05 by Bob Weiner +;; Last-Mod: 30-Jun-24 at 11:27:57 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -25,6 +25,7 @@ ;;; Other required Elisp libraries ;;; ************************************************************************ +(require 'hbut) (require 'hyrolo) (require 'hywiki) diff --git a/kotl/klink.el b/kotl/klink.el index 6482434e1e..f91366c779 100644 --- a/kotl/klink.el +++ b/kotl/klink.el @@ -3,7 +3,7 @@ ;; Author: Bob Weiner ;; ;; Orig-Date: 15-Nov-93 at 12:15:16 -;; Last-Mod: 30-Oct-23 at 01:00:01 by Bob Weiner +;; Last-Mod: 30-Jun-24 at 11:36:47 by Bob Weiner ;; ;; SPDX-License-Identifier: GPL-3.0-or-later ;; @@ -65,7 +65,7 @@ (require 'subr-x) ;; For string-trim (require 'hmouse-tag) ;; For smart-c-include-regexp -(eval-when-compile (require 'hbut)) ;; For defib. +(require 'hbut) ;; For defib. ;;; ************************************************************************ ;;; Public variables @@ -252,9 +252,11 @@ same directory." See documentation for the `link-to-kotl' function for valid klink formats." (let* ((link-and-pos (klink:at-p)) (link (car link-and-pos)) - (start-pos (nth 1 link-and-pos))) + (start (nth 1 link-and-pos)) + (end (nth 2 link-and-pos))) (when link - (hact 'klink:act link start-pos)))) + (ibut:label-set link start end) + (hact 'klink:act link start)))) (defact link-to-kotl (link) "Display at the top of another window the referent pointed to by LINK. diff --git a/man/hyperbole.texi b/man/hyperbole.texi index 96d03b3153..3a1be6c8fd 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: 30-Jun-24 at 01:27:39 by Bob Weiner +@c Last-Mod: 30-Jun-24 at 11:07:23 by Bob Weiner @c %**start of header (This is for running Texinfo on a region.) @setfilename hyperbole.info @@ -7200,16 +7200,17 @@ if you wnat the button to flash when pressed. @cindex ibtype hact The @code{hact} call, run whenever a button of the type is activated, -must be the last expression within the @code{at-p} form; it will -always return @samp{t} when the @code{at-p} form is tested for a -boolean value since the implicit button type's check has already -evaluated true before this is called. The arguments to the call to -@code{hact} are an action function and whatever arguments it takes. -The action may be a Hyperbole action type created with @code{defact} -or a regular Emacs Lisp function. However, the action should not -return @samp{nil} since any @samp{nil} value returned is converted to -@samp{t} to ensure the implicit button checker recognizes that the -action has been executed. +must be the last expression within the @code{at-p} form unless the +action itself ends with a call to @code{hact}. This call will always +return @samp{t} when the @code{at-p} form is tested for a boolean +value since the implicit button type's check has already evaluated +true before this is called. The arguments to the call to @code{hact} +are an action function and whatever arguments it takes. The action +may be a Hyperbole action type created with @code{defact} or a regular +Emacs Lisp function. However, the action should not return @samp{nil} +since any @samp{nil} value returned is converted to @samp{t} to ensure +the implicit button checker recognizes that the action has been +executed. @cindex action @cindex ibtype action