unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Refreshing the repeat insertion of characters
@ 2022-12-03 23:37 Heime
  0 siblings, 0 replies; only message in thread
From: Heime @ 2022-12-03 23:37 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

I want to insert the letter "B" followed by a space using the function "ticker-second".
The adaptation is to start inserting from a certain position (row col) in a buffer.

Repeat "ticker-second" for 4 repeats, clear the previous inserts and start again.


(defun ticker-second (lampkl)
  "TODO."

  (interactive)

  (cond
   ((eq 'blue lampkl)
       (insert (propertize "B"
                  'font-lock-face '(:background "blue"
                                    :foreground "white"))))

   ((eq 'green lampkl)
       (insert (propertize "G"
                  'font-lock-face '(:background "green"
                                    :foreground "white")))))

  (insert " "))


(defun fire-clock ()
  "TODO."
  (interactive)
  (run-with-timer 0 4 #'firefly-ticker-second 'blue))




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

only message in thread, other threads:[~2022-12-03 23:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-03 23:37 Refreshing the repeat insertion of characters Heime

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).