Path: utzoo!mnetor!uunet!husc6!think!ames!ucsd!sdcsvax!ucsdhub!jack!portnoy!kenobi!ford From: ford@kenobi.UUCP (Mike Ditto) Newsgroups: comp.emacs Subject: Re: auto-execute Message-ID: <70@kenobi.UUCP> Date: 9 Apr 88 19:40:59 GMT References: <270@litp.UUCP> Organization: Omnicron Data Systems, P.O. Box 1721, Bonita, California Lines: 29 In-reply-to: fxtv@litp.UUCP's message of 7 Apr 88 09:14:31 GMT Posting-Front-End: GNU Emacs 18.41.10 of Fri Oct 2 1987 on kenobi (usg-unix-v) In article <270@litp.UUCP> fxtv@litp.UUCP (VAILLANT) asks: > How to translate the Gosling emacs form in Gnu emacs? > > (auto-execute "electric-c-mode" "*.c") Set the variable auto-mode-alist. Documentation: Alist of filename patterns vs corresponding major mode functions. Each element looks like (REGEXP . FUNCTION). Visiting a file whose name matches REGEXP causes FUNCTION to be called. For example, here's an excerpt of my auto-mode-alist's value: (("\\.text$" . text-mode) ("\\.c$" . c-mode) ("\\.h$" . c-mode) ("\\.el$" . emacs-lisp-mode)) You want to do something like: (setq auto-mode-alist (cons '("\\.c$" . electric-c-mode) auto-mode-alist)) -=] Ford [=- "Once there were parking lots, (In Real Life: Mike Ditto) now it's a peaceful oasis. ford%kenobi@crash.CTS.COM This was a Pizza Hut, ...!sdcsvax!crash!kenobi!ford now it's all covered with daisies." -- Talking Heads