help-gnu-emacs
[Top][All Lists]
Advanced

[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:10:53 -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 00:42:49 -0700,
Kevin Rodgers 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.
> Do you do much editing in Fundamental mode?

I do some editing in buffers not related to text-mode.  And yes, I do
some editing in Fundamental (conf files still without specific modes,
for example, or certain buffers open by elisp apps (erc, wanderlust…)).

> You may still want to show it even if you can't delete it:

Maybe, but I don’t think I want this.  All those red spaces are
distracting, and if I can’t edit the buffer I can’t do anything about
it anyway.

> How about:
> (add-hook 'find-file-hook 'delete/show-trailing-whitespace)
> (add-hook 'text-mode-hook 'delete/show-trailing-whitespace)
> (setq default-major-mode 'text-mode)

This would turn on my text-mode customizations (auto-fill,
typopunct-mode etc.) when editing conf files, which I don’t want.

--
Leonardo Boiko
http://namakajiri.net






reply via email to

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