help-gnu-emacs
[Top][All Lists]
Advanced

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

Buttons in help buffer that displays contents of variables


From: Heime
Subject: Buttons in help buffer that displays contents of variables
Date: Sat, 22 Jul 2023 14:40:15 +0000

I want to use a button to display the contents of a variable inside
a help buffer, but the following gives

(wrong-number-of-arguments ((t) nil "Function to be executed when the button is 
clicked..." (interactive) (message "Button clicked!")) 1)
  my-action(#<overlay from 1 to 8 in *Help*>)


(defconst myvar "Text of Front A")

(defun my-action ()
  "Function to be executed when the button is clicked."
  (interactive)
  (message "%s" myvar))

(defun qrh ()
  "Some description."

  (interactive)

  (with-help-window (help-buffer)
    (insert-button "Front A" 'action 'my-action 'follow-link t)))




reply via email to

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