From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: How to rescan for mode comment in new buffer? Date: 31 Jul 2009 20:08:04 GMT Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1249072866 31241 80.91.229.12 (31 Jul 2009 20:41:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Jul 2009 20:41:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 31 22:40:59 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MWyuM-0001yN-Sd for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Jul 2009 22:40:55 +0200 Original-Received: from localhost ([127.0.0.1]:40752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWyuM-0007Im-4w for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Jul 2009 16:40:54 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-X-Trace: individual.net GeElsvXFJ2jf5OHUhkqZwALS0gHwtYhuSzhNpGZgOhYQLbU+5K Cancel-Lock: sha1:HH+F6bLG2UXwPCaSFC2PMZKKX8A= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/0.9.9 (Linux) Original-Xref: news.stanford.edu gnu.emacs.help:171399 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66587 Archived-At: 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)