home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / help-lucid-emacs / text0269.txt < prev    next >
Encoding:
Text File  |  1993-07-14  |  1.1 KB  |  37 lines

  1. >>>>> On Mon, 3 May 1993 09:37:48 -0500,
  2. >>>>> elm113!Mike.Battaglia@uunet.uu.net (Mike Battaglia) said:
  3.  
  4.   Battaglia> Adriaan Joubert wrote about "How does lemacs determine what mode to use?" on 3 May 1993
  5.  
  6.   Joubert> Hi,
  7.  
  8.   Joubert> As the subject header says: How does lemacs determine what mode to
  9.   Joubert> use?
  10.  
  11.   Joubert> I would like lemacs to go into Fortran mode for files ending on .F,
  12.   Joubert> into Fortran 90 mode for files ending in .f90 and into Perl mode
  13.   Joubert> for files ending in .prl. I can't figure out how Emacs decides
  14.   Joubert> which mode to use though.
  15.  
  16.  
  17.   Battaglia> Look at the variable 'auto-mode-alist' 
  18.  
  19. To be more precise:
  20.  
  21.         (defvar auto-mode-alist nil)
  22.         (setq auto-mode-alist
  23.               (append (list (cons "\\.F$" 'fortran-mode)
  24.                             (cons "\\.f90$" 'fortran-90-mode)
  25.                             (cons "\\.prl$" 'perl-mode))
  26.                       auto-mode-alist))
  27.  
  28.  
  29. You still need to substitute the correct commands for fortran-mode and
  30. fortran-90-mode, I don't know their names...
  31.  
  32.         .kai
  33.  
  34. --
  35.   Life is hard and then you die.
  36.  
  37.