unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Cc: Juanma Barranquero <lektu@terra.es>, emacs-devel@gnu.org
Subject: Re: occur-mode-hook run too early to be useful
Date: Wed, 28 Aug 2002 17:39:47 +0200	[thread overview]
Message-ID: <vaflm6rq9fg.fsf@INBOX.auto.emacs.devel.tok.lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <200208281532.g7SFWr404685@rum.cs.yale.edu> ("Stefan Monnier"'s message of "Wed, 28 Aug 2002 11:32:53 -0400")

"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> 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	other threads:[~2002-08-28 15:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-28  9:16 occur-mode-hook run too early to be useful Juanma Barranquero
2002-08-28 14:30 ` Stefan Monnier
2002-08-28 15:06   ` Juanma Barranquero
2002-08-28 15:11     ` Stefan Monnier
2002-08-28 15:25       ` Juanma Barranquero
2002-08-28 15:30         ` Juanma Barranquero
2002-08-29 17:50       ` Richard Stallman
2002-08-30  2:14         ` Juanma Barranquero
2002-08-28 15:29     ` Kai Großjohann
2002-08-28 15:32       ` Stefan Monnier
2002-08-28 15:39         ` Kai Großjohann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vaflm6rq9fg.fsf@INBOX.auto.emacs.devel.tok.lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    --cc=emacs-devel@gnu.org \
    --cc=lektu@terra.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).