all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Application of 'cursor-type.
@ 2024-11-30  0:12 Heime via Users list for the GNU Emacs text editor
  2024-12-05  2:43 ` Joel Reicher
  0 siblings, 1 reply; 2+ messages in thread
From: Heime via Users list for the GNU Emacs text editor @ 2024-11-30  0:12 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

I am having difficulty understanding the application of 'cursor-type.

I want to call the function on the current buffer to change the cursor 
form upon the buffer I am working with.  I use set-default which affects
those buffers which do not have local binding of 'cursor-type.  But how
would I know whether there is a local binding or not?  If there is a local
binding and want to change it, would one use setq instead.

How would the implementation change?

(defun paulatuk-cursor-form (actm)

  (interactive
    (list
      (let ( (cseq '("bar" "hbar" "hollow" "box")) )
        (completing-read " Cursor Form: " cseq nil t "box"))))

  (let ( (actn (if (stringp actm) (intern actm) actm)))

    (cond
      ((eq actn 'bar)     (set-default 'cursor-type 'bar))
      ((eq actn 'hbar)    (set-default 'cursor-type 'hbar))
      ((eq actn 'hollow)  (set-default 'cursor-type 'hollow))
      ((eq actn 'box)     (set-default 'cursor-type 'box))
      (t
         (message "cupola-cursor-form")
         (message " └── Cursor Form: Invalid")
         (message " └── Got: %s" actn)
         (message " └── Choice: 'bar, 'hbar, 'hollow, 'box "))) ))





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

end of thread, other threads:[~2024-12-05  2:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-30  0:12 Application of 'cursor-type Heime via Users list for the GNU Emacs text editor
2024-12-05  2:43 ` Joel Reicher

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.