Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!acorn!ixi!paul From: pd@ixi.uucp (Paul Davey) Newsgroups: comp.emacs Subject: Re: text-mode-hook Message-ID: Date: 10 Apr 90 15:02:55 GMT References: Sender: paul@ixi.co.uk (Paul Davey) Organization: IXI Ltd. Lines: 39 In-reply-to: Damon.Lipparelli@CS.CMU.EDU's message of 8 Apr 90 19:15:20 GMT In article Damon.Lipparelli@CS.CMU.EDU writes: Hello. I'm having trouble with the text-mode-hook feature. I'd like to set things so that when I enter text mode, I'm automatically put into auto-fill mode as well. I tried setting the variable text-mode-hook to be auto-fill-mode (ie, "(setq text-mode-hook 'auto-fill-mode)"), but I get the error "Wrong number of arguments" and then a lambda expression. I assume that this means that auto-fill-mode is expecting arguments (as documented it can take one), but I can just type auto-fill-mode to the mode-line and it toggles auto-fill. What am I missing? Thanks in advance, Damon Lipparelli (lipp@cs.cmu.edu) I had some trouble working this out when I first started customising emacs. One way is to use (setq text-mode-hook 'turn-on-auto-fill) but when I wanted abbrev mode in text as well I changed it to (setq text-mode-hook '(lambda () (abbrev-mode 1) (auto-fill-mode 1))) -- Regards, paul@ixi.uucp IXI Limited Paul Davey ...!uunet!ixi!paul 62-74 Burleigh Street +44 224 462 132 (fax) Cambridge U.K. "These are interesting times" +44 223 462 131 (vox) CB1 1OJ -- Regards, paul@ixi.uucp IXI Limited Paul Davey ...!uunet!ixi!paul 62-74 Burleigh Street +44 224 462 132 (fax) Cambridge U.K.