From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gijs Hillenius Newsgroups: gmane.emacs.help Subject: Re: auto-mode-alist, adding two modes Date: Fri, 12 Oct 2007 07:37:05 +0200 Message-ID: <87fy0gao72.fsf@hillenius.net> References: <878x6dboyn.fsf@hillenius.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1192170874 24990 80.91.229.12 (12 Oct 2007 06:34:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Oct 2007 06:34:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 12 08:34:24 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 1IgE6J-00036x-Ru for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Oct 2007 08:34:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgE6D-0000OA-Ne for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Oct 2007 02:34:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!feeder.news-service.com!newsgate.cistron.nl!xs4all!transit2.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Original-Newsgroups: gnu.emacs.help X-Operating-System: Debian GNU/Linux Sid X-GPGP-Fingerprint: 0D0B 9C67 0520 3B27 A91C 369B 7154 1B0A 04CF 3929 User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:zzAWQEB5f14eq2E7Rrt4687jup0= Original-Lines: 25 Original-NNTP-Posting-Host: 82.93.230.201 Original-X-Trace: 1192167425 news.xs4all.nl 235 [::ffff:82.93.230.201]:59674 Original-X-Complaints-To: abuse@xs4all.nl Original-Xref: shelby.stanford.edu gnu.emacs.help:152856 X-Mailman-Approved-At: Fri, 12 Oct 2007 02:26:14 -0400 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:48361 Archived-At: On 11 Oct 2007, Johan Bockgård wrote: >> (add-hook 'gijs-text-mode-hook 'longlines-mode) >> (add-hook 'gijs-text-mode-hook 'flyspell-mode) > > Don't do that. This *toggles* {longlines,flyspell}-mode. If the parent > mode hook (text-mode-hook) turned it on, this will turn it off again. Here's how it currently (seems to) work(s) just fine. Thanks to the posters in the group: (define-derived-mode my-text-mode text-mode "Text" "Modified text-mode, includes longlines-mode and flyspell-mode" (longlines-mode 1) (flyspell-mode 1)) -- I knew then (in 1970) that a 4-kbyte minicomputer would cost as much as a house. So I reasoned that after college, I'd have to live cheaply in an apartment and put all my money into owning a computer. -- Apple co-founder Steve Wozniak, EE Times, June 6, 1988, pg 45