emacs-devel
[Top][All Lists]
Advanced

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

Re: occur-mode-hook run too early to be useful


From: Kai Großjohann
Subject: Re: occur-mode-hook run too early to be useful
Date: Wed, 28 Aug 2002 17:39:47 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

"Stefan Monnier" <monnier+gnu/address@hidden> writes:

>> How about this:  Rename occur-mode to occur-setup or occur-initialize
>> or occur-frobnicate, make a new function occur-mode which just sets up
>> keymaps and such stuff, call that function at the end of occur-1 and
>> run the hook from there.  WDYT?
>
> That's pretty much already what happens except for the `call at the end'
> because occur sets up buffer-local variables which would be killed
> by the `kill-all-local-variables', so it needs to setup the mode first
> (or to mark them as temporary-local which might be the right thing
> to do anyway for all I know).

If you want to allow the user to say M-x occur-mode RET, then you
need to somehow handle the `occur-mode is called too late' case,
anyway.  Whatever the solution, afterwards you can call occur-mode at
the end of occur-1 :-)

But the logic in occur-1 is really not obvious, so it might not be
easy to handle the too-late case...

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)




reply via email to

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