[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: auto-mode-alist, adding two modes

From: Gijs Hillenius
Subject: Re: auto-mode-alist, adding two modes
Date: Fri, 12 Oct 2007 07:37:05 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.50 (gnu/linux)

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

reply via email to

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