From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: called by a process filter? Date: Thu, 12 May 2005 09:32:24 -0400 Message-ID: <87hdh81srh.fsf-monnier+emacs@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115904600 13906 80.91.229.2 (12 May 2005 13:30:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 May 2005 13:30:00 +0000 (UTC) Cc: Kevin Rodgers , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 12 15:29:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DWDjz-00066Y-5f for ged-emacs-devel@m.gmane.org; Thu, 12 May 2005 15:28:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DWDsv-0007e9-U2 for ged-emacs-devel@m.gmane.org; Thu, 12 May 2005 09:37:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DWDpd-0004lF-14 for emacs-devel@gnu.org; Thu, 12 May 2005 09:34:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DWDpa-0004kR-TY for emacs-devel@gnu.org; Thu, 12 May 2005 09:34:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DWDp6-00048w-Ra for emacs-devel@gnu.org; Thu, 12 May 2005 09:33:57 -0400 Original-Received: from [209.226.175.93] (helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DWDuJ-0005ou-Bu; Thu, 12 May 2005 09:39:19 -0400 Original-Received: from alfajor ([67.68.217.114]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050512133227.EXEF16985.tomts36-srv.bellnexxia.net@alfajor>; Thu, 12 May 2005 09:32:27 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id AA450D7301; Thu, 12 May 2005 09:32:25 -0400 (EDT) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Thu, 12 May 2005 14:40:28 +0200") 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:37032 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37032 > Doesn't the following work? > (defvar in-my-filter-p nil) > (defun my-filter (proc text) > (let ((in-my-filter-p t)) > ...)) > (defun my-after-change-function () > (if in-my-filter-p > ... No, because the after-change-function is generic and doesn't know about all the various filter functions it might interact with (which it'd have to tweak with defadvice in order to do what you suggest). My guess is that after-change-function is the wrong place to do what the OP wants to do. Stefan