[comp.editors] c-mode without a .c suffix

rjshaw@ramius.llnl.gov (Robert Shaw) (04/18/91)

Howdy. I've never been here before.

How do I make gnuemacs start up in c-mode for files ending in .pcp as well
as .c and .h ?

Thanx!


===============================================================================
 Rob Shaw                                              rjshaw@ocfmail.llnl.gov
===============================================================================

brendan@cs.widener.edu (Brendan Kehoe) (04/19/91)

In <822@llnl.LLNL.GOV>, rjshaw@ramius.llnl.gov writes:
>How do I make gnuemacs start up in c-mode for files ending in .pcp as well
>as .c and .h ?

   In your .emacs file make it say:

		(setq auto-mode-alist '(
			("\\.c$" . c-mode) ("\\.pl$" . perl-mode)
			("\\.pcp$" . c-mode) ("\\.h$" . c-mode)))

   (Threw in Perl to show an example of other modes.)

   Have fun..

Brendan

-- 
     Brendan Kehoe - Widener Sun Network Manager - brendan@cs.widener.edu
  Widener University in Chester, PA                A Bloody Sun-Dec War Zone
      "Does this person look relaxed do you?  Well, it's actually an
 0            experiment of Contour's new 565-E chair!"

vlr@litwin.com (Vic Rice) (04/21/91)

In <GH6_.C@cs.widener.edu> brendan@cs.widener.edu (Brendan Kehoe) writes:

>In <822@llnl.LLNL.GOV>, rjshaw@ramius.llnl.gov writes:
>>How do I make gnuemacs start up in c-mode for files ending in .pcp as well
>>as .c and .h ?

>   In your .emacs file make it say:

>		(setq auto-mode-alist '(
>			("\\.c$" . c-mode) ("\\.pl$" . perl-mode)
>			("\\.pcp$" . c-mode) ("\\.h$" . c-mode)))

>   (Threw in Perl to show an example of other modes.)


You can stick the following any where in the first non-blank line of the file:
-*-C-*- or -*-Fortran-*- or whatever ...