[Top][All Lists]

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

Re: occur-hook changing the current buffer

From: Juri Linkov
Subject: Re: occur-hook changing the current buffer
Date: Wed, 22 Jun 2005 19:29:59 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> I'm not putting the "blame" on the change (which is, AFAICS,
> correct), only stressing that when a function runs a hook and
> *afterwards* sets the not-modified flag, protecting against the
> change of the buffer is not a defense against "random crap".

Why setting the not-modified flag comes after running a hook?  AFAIK,
there is a convention that run-hook should be the last element in the
function body, so users could override every default settings of the
function, including in this particular case setting the modification flag.
So it seems the correct fix is just to move (run-hooks 'occur-hook) down
to be the last funcall in the `occur-1' function body.

Juri Linkov

reply via email to

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