From: Heime via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Application of 'cursor-type.
Date: Sat, 30 Nov 2024 00:12:43 +0000 [thread overview]
Message-ID: <0MiHZ8tFUgi-FPWGHnY7ZUwIMqVDHGAC-Zo4FSIKI9cO8G9ZoCXmb38ayDkwo5qVqNmLfhK4WFI3yK6DkEG3urK5gxzi6WqJRPdspLrjcfA=@protonmail.com> (raw)
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 "))) ))
next reply other threads:[~2024-11-30 0:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-30 0:12 Heime via Users list for the GNU Emacs text editor [this message]
2024-12-05 2:43 ` Application of 'cursor-type Joel Reicher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='0MiHZ8tFUgi-FPWGHnY7ZUwIMqVDHGAC-Zo4FSIKI9cO8G9ZoCXmb38ayDkwo5qVqNmLfhK4WFI3yK6DkEG3urK5gxzi6WqJRPdspLrjcfA=@protonmail.com' \
--to=help-gnu-emacs@gnu.org \
--cc=heimeborgia@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).