From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: Controling modifications and cuting invisible ? Date: Fri, 23 May 2003 13:40:15 +0200 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <87d6icj5kk.fsf@noos.fr> <84he7nym8j.fsf@lucy.is.informatik.uni-duisburg.de> <87u1blc3fr.fsf@noos.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1053690762 2856 80.91.224.249 (23 May 2003 11:52:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 23 May 2003 11:52:42 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Fri May 23 13:52:39 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19JB5T-0000gO-00 for ; Fri, 23 May 2003 13:51:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19JB4D-0005LW-HL for gnu-help-gnu-emacs@m.gmane.org; Fri, 23 May 2003 07:50:33 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!dialin-145-254-194-242.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: dialin-145-254-194-242.arcor-ip.net (145.254.194.242) Original-X-Trace: fu-berlin.de 1053690381 914295 145.254.194.242 (16 [87814]) X-Attribution: os X-Face: "HgH2sgK|bfH$; PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6;Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (windows-nt) Cancel-Lock: sha1:yJOqe3UjIGbBwJsB/dkAEkgihmE= Original-Xref: shelby.stanford.edu gnu.emacs.help:113611 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10107 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10107 François Fleuret 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é!