help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to rescan for mode comment in new buffer?


From: Joost Kremers
Subject: Re: How to rescan for mode comment in new buffer?
Date: 31 Jul 2009 20:08:04 GMT
User-agent: slrn/0.9.9 (Linux)

KARR, DAVID (ATTCINW) wrote:
> If I've created a new empty file and pasted in the header that will make
> the shell and Emacs recognize it as a Perl script, what's the easiest
> way to "refresh" it so that Emacs recognizes that it has to go into Perl
> mode?  I could just manually run "perl-mode", but I'd rather a cleaner
> way to do it.  Saving, killing the buffer and reloading it seems
> excessive also.

saving and executing M-x revert-buffer will do the trick.

or set up auto-mode-alist so that it recognises the major mode from the
extension that you give your perl scripts (if you give them a fixed extension,
that is.)


-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]