[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to apply a minor mode to all buffers
From: |
Leonardo Boiko |
Subject: |
Re: How to apply a minor mode to all buffers |
Date: |
Thu, 08 Feb 2007 10:20:47 -0200 |
User-agent: |
Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.0.93 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) |
At Wed, 07 Feb 2007 12:22:54 -0500, Stefan Monnier wrote:
> > find-file-hook won’t apply to buffers unrelated to files, though.
> > after-change-major-mode-hook almost does the trick, but it still
> > doesn’t get fundamental-mode.
> Then report this with M-x report-emacs-bug.
I’m under the impression that this is intended behavior for
after-change-major-mode-hook; it is not supposed to be
fundamental-mode-hook.
My argument is: fundamental-mode-hook would be a nice thing to have
because people might want to run elisp code (not just to set
variables) every time a buffer is created.
> Then add it to those email-drafts buffers as well. Otherwise you risk
> screwing up many more cases for buffers you don't think of
> (e.g. minibuffers, help buffers, ...).
I don’t care. If I can edit it, I want any existing trailing
whitespace to be deleted, and I want show-trailing-whitespace to be
t. If I can’t edit it, show-trailing-whitespace should be nil.
The only exception would be some editable mode in which trailing
whitespace is significant, but I can’t think of any. They’d be so
exceptional that I’m willing to list them manually.
> If you just create a scratch buffer it won't have any data coming from nasty
> vi users (aka vi users).
True. Then the automatic delete-trailing-whitespaces would be
redundant (but harmless). However, I still want it to automatically
turn on show-trailing-whitespace.
--
Leonardo Boiko
http://namakajiri.net
- Re: How to apply a minor mode to all buffers, leoboiko, 2007/02/02
- Re: How to apply a minor mode to all buffers, Stefan Monnier, 2007/02/07
- Re: How to apply a minor mode to all buffers, Robert Thorpe, 2007/02/07
- Re: How to apply a minor mode to all buffers,
Leonardo Boiko <=
- Re: How to apply a minor mode to all buffers, Juanma Barranquero, 2007/02/08
- Message not available
- Re: How to apply a minor mode to all buffers, Robert Thorpe, 2007/02/08
- Re: How to apply a minor mode to all buffers, Juanma Barranquero, 2007/02/08
- Message not available
- Re: How to apply a minor mode to all buffers, Robert Thorpe, 2007/02/09
- Re: How to apply a minor mode to all buffers, Juanma Barranquero, 2007/02/09