[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: called by a process filter?

From: Kim F. Storm
Subject: Re: called by a process filter?
Date: Thu, 12 May 2005 15:58:17 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> 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 

I would expect it to be buffer local, and as such, it would only be
triggered by filter functions that update that buffer.

>                                                  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).

Of course, if the after-change-function _is_ generic, that would be

> My guess is that after-change-function is the wrong place to do what the OP
> wants to do.

It does indeed seem odd that the after-change-function need to know
what command made the change...

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]