From: Joost Kremers <joostkremers@fastmail.fm>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Disable self-insert-command
Date: Fri, 17 May 2019 12:59:42 +0200 [thread overview]
Message-ID: <87lfz55otd.fsf@fastmail.fm> (raw)
Hi,
I've been trying to figure out if there's a straightforward way
to disable all self-inserting characters through a minor mode, but
I haven't been able to find something. Two options come to mind,
but they both don't feel "right". One would be to simply bind all
self-inserting characters to `ignore', which seems cumbersome and
error-prone, however. The other option that comes to mind is
advising `self-insert-command`, though I haven't (yet) tested
whether that would actually work and wouldn't cause any other
problems, given that it's a primitive function.
I guess I could also make the relevant buffer read-only, but then
every key that's not bound to something else produces a "Buffer is
read-only" error...
Any ideas? Anything I'm overlooking?
TIA
Joost
--
Joost Kremers
Life has its moments
next reply other threads:[~2019-05-17 10:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-17 10:59 Joost Kremers [this message]
2019-05-17 11:17 ` Disable self-insert-command Noam Postavsky
2019-05-17 12:54 ` Mauro Aranda
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfz55otd.fsf@fastmail.fm \
--to=joostkremers@fastmail.fm \
--cc=help-gnu-emacs@gnu.org \
/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.
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.