[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ability to use a button to run interactive function
From: |
Stephen Berman |
Subject: |
Re: Ability to use a button to run interactive function |
Date: |
Mon, 28 Aug 2023 16:55:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On Mon, 28 Aug 2023 14:34:23 +0000 Heime <heimeborgia@protonmail.com> wrote:
> The following function does not allow me to call it via a button. Would
> this be possible, whilst also be allowed to call the function interactively
> using 'M-x maces-snapshot' ?
>
>
> (defun maces-snapshot ()
> "Prints information about how to install emacs."
> (interactive)
>
> (with-help-window (help-buffer)
>
> (insert-button "[F5]" 'action 'action-snapshot
> 'follow-link t)
> (insert " A Snapshot Repository \n")
>
> (insert-button "[B5]" 'action 'action-snapshot
> 'follow-link t)
> (insert " Obtaining a Snapshot Repository with Git \n") ))
Yes, give maces-snapshot an optional argument:
(defun maces-snapshot (&optional button)
...
Steve Berman