all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Francis Moreau <francis.moro@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: hook for buffer creation
Date: Sat, 20 Mar 2010 11:45:41 -0700 (PDT)	[thread overview]
Message-ID: <3e29dfc2-5604-47d4-84e1-db2e113f84a5@e7g2000yqf.googlegroups.com> (raw)
In-Reply-To: 4ba1562a$0$274$14726298@news.sunsite.dk

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.


  reply	other threads:[~2010-03-20 18:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-13 17:44 hook for buffer creation Francis Moreau
2010-03-15 14:40 ` Lowell Gilbert
2010-03-15 20:37   ` Francis Moreau
2010-03-15 22:16     ` Lowell Gilbert
2010-03-17 22:24 ` Colin S. Miller
2010-03-20 18:45   ` Francis Moreau [this message]
2010-03-22 15:33     ` Stefan Monnier
2010-05-04 17:50   ` Dan Davison
     [not found]   ` <mailman.15.1272995469.29092.help-gnu-emacs@gnu.org>
2010-05-04 19:49     ` Colin S. Miller
2010-05-05  4:39 ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=3e29dfc2-5604-47d4-84e1-db2e113f84a5@e7g2000yqf.googlegroups.com \
    --to=francis.moro@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.