From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leonardo Boiko Newsgroups: gmane.emacs.help Subject: Re: How to apply a minor mode to all buffers Date: Thu, 08 Feb 2007 10:10:53 -0200 Message-ID: <874ppwj1de.wl%leoboiko@gmail.com> References: <877ivkjb66.fsf@trick.ulm.malte.spiess> <87lkjgs6lf.wl%leonardo.boiko@corp.orolix.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1170936970 12617 80.91.229.12 (8 Feb 2007 12:16:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Feb 2007 12:16:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 08 13:15:59 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HF8By-0008LH-IY for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Feb 2007 13:15:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HF8Bx-0000Qu-VD for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Feb 2007 07:15:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HF8Bi-0000Lv-Sa for help-gnu-emacs@gnu.org; Thu, 08 Feb 2007 07:15:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HF8Bh-0000Jj-E7 for help-gnu-emacs@gnu.org; Thu, 08 Feb 2007 07:15:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HF8Bh-0000Jg-81 for help-gnu-emacs@gnu.org; Thu, 08 Feb 2007 07:15:41 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HF8Bg-0007NX-Nl for help-gnu-emacs@gnu.org; Thu, 08 Feb 2007 07:15:41 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HF89O-0002U9-JB for help-gnu-emacs@gnu.org; Thu, 08 Feb 2007 13:13:19 +0100 Original-Received: from 201.44.96.130 ([201.44.96.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Feb 2007 13:13:18 +0100 Original-Received: from leoboiko by 201.44.96.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Feb 2007 13:13:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 201.44.96.130 In-Reply-To: Mail-Followup-To: help-gnu-emacs@gnu.org, leoboiko@gmail.com User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.93 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40956 Archived-At: At Wed, 07 Feb 2007 00:42:49 -0700, Kevin Rodgers wrote: > > find-file-hook won=E2=80=99t apply to buffers unrelated to files, thoug= h. > > after-change-major-mode-hook almost does the trick, but it still > > doesn=E2=80=99t 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=E2=80= =A6)). > You may still want to show it even if you can't delete it: Maybe, but I don=E2=80=99t think I want this. All those red spaces are distracting, and if I can=E2=80=99t edit the buffer I can=E2=80=99t do anyt= hing 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=E2=80=99t want. -- Leonardo Boiko http://namakajiri.net