Allyn Dimock <[EMAIL PROTECTED]> writes:

> When first trying to edit a .java file I  got backtrace:
> Debugger entered--Lisp error: (wrong-type-argument listp turn-on-auto-fill)
>   member(turn-on-auto-fill turn-on-auto-fill)
>
> I commented out the only reference to auto-fill in my .emacs:
> (setq text-mode-hook 'turn-on-auto-fill)
> This should not have made any difference unless some artifact of
> elisp's dynamic scope, but commenting it out seems to have made
> problem go away.

You are supposed to use (add-hook 'text-mode-hook 'turn-on-auto-fill)
instead of your setq statement.  The reason is that a hook is normally
a list of functions to run.  But if you use the setq statement, then
the hook will be just a single function, with no way to put in
multiple functions.

What if you also want to use abbreviations in text mode?  Then you
need abbrev-mode in the text-mode-hook, too, and your setq will break.

Once upon a time, having a hook be a single function rather than a
list of functions was supported, but now I think it does not make
sense to cater for that use anymore.

Kai

Reply via email to