fxtv@litp.UUCP (VAILLANT) (04/07/88)
How to translate the Gosling emacs form in Gnu emacs? (auto-execute "electric-c-mode" "*.c") ------ Francois-xavier Testard-Vaillant
ford@kenobi.UUCP (Mike Ditto) (04/10/88)
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