Path: utzoo!attcan!uunet!mailrus!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: comp.emacs Subject: Re: text-mode-hook Message-ID: <54776@bbn.COM> Date: 12 Apr 90 13:54:32 GMT References: <54725@bbn.COM> Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 26 In-reply-to: jr@bbn.com (John Robinson) In article <54725@bbn.COM>, jr@bbn (John Robinson) writes: >A hook can be a list of functions. ... > > (setq text-mode-hook '((lambda () (abbrev-mode 1)) (turn-on-auto-fill-mode))) Well, that had two problems [assuming 18,55, if it matters]: 1. turn-on-auto-fill-mode doesn't exist; it is really turn-on-auto-fill. 2. The members of the list are symbols, not lists of symbols [a list is okay only when it is a lambda-expression]. So the correct form should be (and I *did* try this one): (setq text-mode-hook '((lambda () (abbrev-mode 1)) turn-on-auto-fill)) > (setq text-mode-hook (cons text-mode-hook '(turn-on-auto-fill))) >... > (setq text-mode-hook (cons text-mode-hook '((lambda () (abbrev-mode 1))))) These fail if text-mode-hook is undefined. See Bob Weiner's separate followup for a nicer solution. -- /jr, nee John Robinson Life did not take over the globe by combat, jr@bbn.com or bbn!jr but by networking -- Lynn Margulis