all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Functions for buttons with additional arguments
@ 2024-06-28 14:33 Heime
  0 siblings, 0 replies; only message in thread
From: Heime @ 2024-06-28 14:33 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

Am using buttons to show text stored in strings montext-lw and montext-kk,
by calling the appropriate functions mondu-lw and mondu-kk.

  (insert-button "[BTN]" 'action 'mondu-lw)

Can the functions with argument button mondu-lw and mondu-lw be allowed to
have additional arguments ? 


Code:

(defconst montext-lw " 1. LW"

(defconst montext-kk " 2. KK"

(defun mondu-lw (button)
  (with-help-window (help-buffer)
    (insert montext-lw)))

(defun mondu-kk (button)
  (with-help-window (help-buffer)
    (insert montext-kk)))

(defun mondu ()

  (interactive)

  (with-current-buffer (get-buffer-create "Mondu")

    (insert " LDU \n\n")

    (insert-button "[BTN]" 'action 'mondu-lw)

    (insert-button "[BTN]" 'action 'mondu-kk)

  (pop-to-buffer "Mondu"))







^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-28 14:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28 14:33 Functions for buttons with additional arguments Heime

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.