Path: utzoo!attcan!uunet!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!usc!apple!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: comp.emacs Subject: Re: text-mode-hook Message-ID: <54725@bbn.COM> Date: 11 Apr 90 14:00:27 GMT References: Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 20 In-reply-to: pd@ixi.uucp (Paul Davey) In article , pd@ixi (Paul Davey) writes: >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))) A hook can be a list of functions. Thus the above could be rewritten: (setq text-mode-hook '((lambda () (abbrev-mode 1)) (turn-on-auto-fill-mode))) Pretty pointless in this case, but this lets you add to an existing hook list if that's what you'd like to do: (setq text-mode-hook (cons text-mode-hook '(turn-on-auto-fill))) ... (setq text-mode-hook (cons text-mode-hook '((lambda () (abbrev-mode 1))))) See the definition of run-hooks. -- /jr, nee John Robinson Life did not take over the globe by combat, jr@bbn.com or bbn!jr but by networking -- Lynn Margulis