[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hook for buffer creation
From: |
Francis Moreau |
Subject: |
Re: hook for buffer creation |
Date: |
Tue, 04 May 2010 15:42:55 -0000 |
User-agent: |
G2/1.0 |
Hello,
On 17 mar, 23:24, "Colin S. Miller" <no-spam-
thank-...@csmiller.demon.co.uk> wrote:
>
> You could use buffer-list-changed-hook. It's called whenever
> a frame has its buffers modified. You'd need to call (window-list) on
> that frame, and then get the buffer for each window. Then check if that
> buffer has yet to be processed by your hook
>
> If you want only the text-editing buffers, regardless of the major mode,
> then putting a defadvice on fundamental-mode (it doesn't have a hook),
> should work. IIRC, all text-edting modes are derived from fundamental-mode,
> and its hooks/init function are called.
That's a good hint, thanks.