From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: How to avoid insert anything without switching to read only Date: Sun, 10 Jul 2005 01:19:13 -0400 Message-ID: References: <42CF8E15.7010900@student.lu.se> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1120973614 30096 80.91.229.2 (10 Jul 2005 05:33:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2005 05:33:34 +0000 (UTC) Cc: kifer@cs.sunysb.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 10 07:33:26 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DrURE-00068f-Cg for ged-emacs-devel@m.gmane.org; Sun, 10 Jul 2005 07:33:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DrUSj-0006vZ-Dj for ged-emacs-devel@m.gmane.org; Sun, 10 Jul 2005 01:34:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DrULK-0003kF-MO for emacs-devel@gnu.org; Sun, 10 Jul 2005 01:27:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DrUL6-0003bf-8z for emacs-devel@gnu.org; Sun, 10 Jul 2005 01:26:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DrUL5-0003Z3-E0 for emacs-devel@gnu.org; Sun, 10 Jul 2005 01:26:51 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DrUNT-0008Gn-1H for emacs-devel@gnu.org; Sun, 10 Jul 2005 01:29:19 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1DrUDh-0004lE-Tk; Sun, 10 Jul 2005 01:19:13 -0400 Original-To: Lennart Borgman In-reply-to: <42CF8E15.7010900@student.lu.se> (message from Lennart Borgman on Sat, 09 Jul 2005 10:43:01 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:40716 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40716 When you put advice on primitive functions, it only works when they are called from Lisp code. The command loop calls self-insert directly in a special way, so your advice is not called. What you should do is rebind those characters to run another command, one that does your special thing and calls self-insert.