From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Longlines and insert Date: Tue, 15 Nov 2005 22:02:24 -0500 Message-ID: <871x1h9txb.fsf@stupidchicken.com> References: <874q6fa1t0.wl%david.wallin@ul.ie> <87hdaebqxb.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1132110378 21322 80.91.229.2 (16 Nov 2005 03:06:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Nov 2005 03:06:18 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 16 04:06:17 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EcDb4-0005tI-6s for ged-emacs-devel@m.gmane.org; Wed, 16 Nov 2005 04:04:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EcDb3-00065p-Ks for ged-emacs-devel@m.gmane.org; Tue, 15 Nov 2005 22:04:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EcDZ5-0005Wi-IO for emacs-devel@gnu.org; Tue, 15 Nov 2005 22:02:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EcDZ4-0005WC-FW for emacs-devel@gnu.org; Tue, 15 Nov 2005 22:02:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EcDZ4-0005W1-0h for emacs-devel@gnu.org; Tue, 15 Nov 2005 22:02:26 -0500 Original-Received: from [18.95.5.42] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EcDZ3-0007Rs-Ok for emacs-devel@gnu.org; Tue, 15 Nov 2005 22:02:25 -0500 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id 88D571E4318; Tue, 15 Nov 2005 22:02:26 -0500 (EST) Original-To: emacs-devel@gnu.org In-Reply-To: <87hdaebqxb.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 14 Nov 2005 21:12:00 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:46073 Archived-At: Chong Yidong writes: > One possibility is to define a new variable `insert-filters', to store > a list of filter functions to run on strings before they are inserted > (analogous to `buffer-substring-filters'). Let me be a little more specific: this would be a variable `insert-string-filters', normally bound to nil. insert_string (in insdel.c) checks the value of insert-string-filters passed to it. If non-nil, it makes use of it as follows: Like `buffer-substring-filters', `insert-string-filters' would contain a list of function, each of which accepts a single argument, a string, and returns a string. The string argument is passed to the first function in the list, and the return value of each function is passed to the next. The last return value is the one actually inserted.