From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: PJ Weisberg Newsgroups: gmane.emacs.help Subject: Re: How can I enable minor mode, always? Date: Wed, 27 Oct 2010 16:07:55 +0000 Message-ID: References: <30023005.post@talk.nabble.com> <30062842.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1288199654 28842 80.91.229.12 (27 Oct 2010 17:14:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Oct 2010 17:14:14 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: paxxus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 27 19:14:13 2010 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.69) (envelope-from ) id 1PB9Zj-0004AN-Ib for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Oct 2010 19:14:12 +0200 Original-Received: from localhost ([127.0.0.1]:34532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PB900-00084J-Kh for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Oct 2010 12:37:16 -0400 Original-Received: from [140.186.70.92] (port=60564 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PB8Xk-0008Rv-Hj for Help-gnu-emacs@gnu.org; Wed, 27 Oct 2010 12:08:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PB8Xi-0007z5-JX for Help-gnu-emacs@gnu.org; Wed, 27 Oct 2010 12:08:04 -0400 Original-Received: from smtpauth02.prod.mesa1.secureserver.net ([64.202.165.182]:35485) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PB8Xi-0007yE-BK for Help-gnu-emacs@gnu.org; Wed, 27 Oct 2010 12:08:02 -0400 Original-Received: (qmail 29213 invoked from network); 27 Oct 2010 16:07:58 -0000 Original-Received: from unknown (209.85.215.41) by smtpauth02.prod.mesa1.secureserver.net (64.202.165.182) with ESMTP; 27 Oct 2010 16:07:57 -0000 Original-Received: by ewy25 with SMTP id 25so413038ewy.0 for ; Wed, 27 Oct 2010 09:07:55 -0700 (PDT) Original-Received: by 10.216.231.146 with SMTP id l18mr1840229weq.52.1288195675536; Wed, 27 Oct 2010 09:07:55 -0700 (PDT) Original-Received: by 10.216.233.163 with HTTP; Wed, 27 Oct 2010 09:07:55 -0700 (PDT) In-Reply-To: <30062842.post@talk.nabble.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 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:75256 Archived-At: On Tue, Oct 26, 2010 at 11:49 PM, paxxus wrote: > > Thanks for the suggestions. > > I used fundamental-mode, always. It turns out that you can't add hooks to > that mode, so I changed my default mode to text-mode, and then added this > hook: > > (add-hook 'text-mode-hook (lambda () (interactive) (highlight-80+-mode 1))) > > The define-globalized-minor-mode also looks interesting, I'll try that out. > > I have now worked a couple of days in text-mode instead of fundamental-mode, > and I can't detect any difference at all (which is good for what I want). Is > there a difference other than the hook stuff? It looks like the most noticeable difference between text-mode and fundamental-mode is that by default text-mode puts a newline at the end of the file when you save if there isn't one already. It's the simplest mode other than fundamental, after all. And I would argue that after-change-major-mode-hook *is* fundamental-mode's equivalent of text-mode-hook, since all major modes are supposedly derived from fundamental-mode and those are the hooks that get run when you switch into any mode.