unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to rescan for mode comment in new buffer?
@ 2009-07-31 19:55 KARR, DAVID (ATTCINW)
  2009-07-31 20:07 ` Edward O'Connor
  0 siblings, 1 reply; 4+ messages in thread
From: KARR, DAVID (ATTCINW) @ 2009-07-31 19:55 UTC (permalink / raw)
  To: help-gnu-emacs

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.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to rescan for mode comment in new buffer?
  2009-07-31 19:55 KARR, DAVID (ATTCINW)
@ 2009-07-31 20:07 ` Edward O'Connor
  2009-07-31 20:21   ` KARR, DAVID (ATTCINW)
  0 siblings, 1 reply; 4+ messages in thread
From: Edward O'Connor @ 2009-07-31 20:07 UTC (permalink / raw)
  To: KARR, DAVID (ATTCINW); +Cc: help-gnu-emacs

> 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.

M-x normal-mode RET


HTH. HAND.
Ted




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to rescan for mode comment in new buffer?
       [not found] <mailman.3597.1249070138.2239.help-gnu-emacs@gnu.org>
@ 2009-07-31 20:08 ` Joost Kremers
  0 siblings, 0 replies; 4+ messages in thread
From: Joost Kremers @ 2009-07-31 20:08 UTC (permalink / raw)
  To: help-gnu-emacs

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)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: How to rescan for mode comment in new buffer?
  2009-07-31 20:07 ` Edward O'Connor
@ 2009-07-31 20:21   ` KARR, DAVID (ATTCINW)
  0 siblings, 0 replies; 4+ messages in thread
From: KARR, DAVID (ATTCINW) @ 2009-07-31 20:21 UTC (permalink / raw)
  To: Edward O'Connor; +Cc: help-gnu-emacs

Thanks.

> -----Original Message-----
> From: Edward O'Connor [mailto:hober0@gmail.com]
> Sent: Friday, July 31, 2009 1:07 PM
> To: KARR, DAVID (ATTCINW)
> Cc: help-gnu-emacs@gnu.org
> Subject: Re: How to rescan for mode comment in new buffer?
> 
> > 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.
> 
> M-x normal-mode RET
> 
> 
> HTH. HAND.
> Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-31 20:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.3597.1249070138.2239.help-gnu-emacs@gnu.org>
2009-07-31 20:08 ` How to rescan for mode comment in new buffer? Joost Kremers
2009-07-31 19:55 KARR, DAVID (ATTCINW)
2009-07-31 20:07 ` Edward O'Connor
2009-07-31 20:21   ` KARR, DAVID (ATTCINW)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).