From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: How to apply a minor mode to all buffers Date: Sat, 20 Jan 2007 18:24:59 +0200 Message-ID: References: <877ivkjb66.fsf@trick.ulm.malte.spiess> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1169310312 3691 80.91.229.12 (20 Jan 2007 16:25:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 20 Jan 2007 16:25:12 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 20 17:25:09 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 1H8J1f-00052Y-9H for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Jan 2007 17:25:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H8J1f-0000MX-LE for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Jan 2007 11:25:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H8J1Q-0000L6-IC for help-gnu-emacs@gnu.org; Sat, 20 Jan 2007 11:24:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H8J1P-0000KI-HA for help-gnu-emacs@gnu.org; Sat, 20 Jan 2007 11:24:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H8J1P-0000KE-9Z for help-gnu-emacs@gnu.org; Sat, 20 Jan 2007 11:24:51 -0500 Original-Received: from [213.8.233.22] (helo=nitzan.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H8J1O-0008IH-LS for help-gnu-emacs@gnu.org; Sat, 20 Jan 2007 11:24:50 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-199-87.inter.net.il [80.230.199.87]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id FVF35799 (AUTH halo1); Sat, 20 Jan 2007 18:24:45 +0200 (IST) Original-To: help-gnu-emacs@gnu.org In-reply-to: (aguilar.james@gmail.com) 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:40480 Archived-At: > Date: Fri, 19 Jan 2007 08:30:31 -0800 > From: "James Aguilar" > Cc: help-gnu-emacs@gnu.org > > On 1/19/07, Eli Zaretskii wrote: > > > > Actually, I'm not surprised at all that this functionality is missing . . > > . > > Hmm, I figured that there might be a rationale. However, if that is true, > then why are there global minor modes like global-font-lock-mode? There are exceptions to every rule. > This applies to several programming languages, text files, configuration > files, and even non-files (I have a personal aversion to >80 chars in all > files I edit). Since my only use for emacs is to edit these kinds of files, > I'd like to have a guard at the end so that I can know when I'm over the > line. Then mode hooks are probably the way to go. I doubt that you use too many major modes, so this boils down to crafting a dozen or so mode hooks in your .emacs file. For the few exceptions, you can always turn on the mode by hand. You said you thought using mode hooks looks like a hack, but in fact that is the normal Emacs way of accomplishing such goals.