all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Highlighting text next to button
@ 2024-06-30 20:00 Heime
  2024-06-30 21:52 ` Heime
  0 siblings, 1 reply; 7+ messages in thread
From: Heime @ 2024-06-30 20:00 UTC (permalink / raw
  To: Heime via Users list for the GNU Emacs text editor


I have the function monde that displays some buttons with associated text
describing what the button does.

I would like to highlight the description text corresponding to the button
that was pressed, with NORM being the default when calling the function.   
What can I do ? 

(defun spaz (w)
  "Make a string of width W made of spaces."
  (make-string w ?\s))

(defun mondu ()

  (interactive)

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

    (insert " MAIN PANEL DU \n\n")

    (insert " ")
    (insert-button "[-]" 'action 'mondu-outbd)
    (insert " OUTBD   ")

    (insert-button "[-]" 'action 'mondu-norm)
    (insert " NORM   ")

    ;;------------------------------------------------------------

    (insert-button "[-]" 'action 'mondu-inbd-eng-pri)
    (insert " INBD ENG PRI  \n")

    (insert (spaz 24))
    (insert-button "[-]" 'action 'mondu-inbd-pfd)
    (insert " INBD PFD  \n")

    (insert (spaz 24))
    (insert-button "[-]" 'action 'mondu-inbd-hfd)
    (insert " INBD HFD  \n") )

  (pop-to-buffer "Mondu") )




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-07-01  9:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-30 20:00 Highlighting text next to button Heime
2024-06-30 21:52 ` Heime
2024-06-30 22:11   ` Stephen Berman
2024-06-30 22:32     ` Heime
2024-07-01  7:53       ` Stephen Berman
2024-07-01  8:52         ` Heime
2024-07-01  9:26           ` Stephen Berman

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.