From: Oliver Scholz <alkibiades@gmx.de>
Subject: Re: Controling modifications and cuting invisible ?
Date: Fri, 23 May 2003 13:40:15 +0200 [thread overview]
Message-ID: <u3cj5ao2o.fsf@ID-87814.user.dfncis.de> (raw)
In-Reply-To: 87u1blc3fr.fsf@noos.fr
François Fleuret <francois.fleuret@noos.fr> writes:
[...]
> My problem is that I want to remove *all* keys which can alter the
> buffer, while keeping usual keys (of course) to switch buffer, move
> windows, etc.
I'd say the usual way to do this is to make the buffer read-only:
(setq buffer-read-only t)
Then commands or functions that are supposed to modify the content of
the buffer can do this by binding `inhibit-read-only' temporarily to
t:
(let ((inhibit-read-only t))
...
(modify-the-buffer-contents)
...
)
Oliver
--
4 Prairial an 211 de la Révolution
Liberté, Egalité, Fraternité!
next prev parent reply other threads:[~2003-05-23 11:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-21 22:30 Controling modifications and cuting invisible ? François Fleuret
2003-05-21 23:08 ` Stefan Monnier
2003-05-21 23:12 ` Lute Kamstra
2003-05-22 16:33 ` Kai Großjohann
2003-05-23 11:23 ` François Fleuret
2003-05-23 11:40 ` Oliver Scholz [this message]
2003-05-23 14:58 ` Stefan Monnier
2003-05-23 12:07 ` Oliver Scholz
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=u3cj5ao2o.fsf@ID-87814.user.dfncis.de \
--to=alkibiades@gmx.de \
/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).