From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: Force Reread of "local variables:" Date: Mon, 02 Feb 2004 14:23:48 +0100 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87wu7539ea.fsf@ID-87814.user.dfncis.de> References: <7f477f72.0401312101.256a733c@posting.google.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1075733448 28625 80.91.224.253 (2 Feb 2004 14:50:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2004 14:50:48 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 02 15:50:44 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AnfPP-0003hP-00 for ; Mon, 02 Feb 2004 15:50:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AnfMZ-0003Uz-MA for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Feb 2004 09:47:47 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!dialin-145-254-135-140.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-NNTP-Posting-Host: dialin-145-254-135-140.arcor-ip.net (145.254.135.140) Original-X-Trace: news.uni-berlin.de 1075732860 30710147 145.254.135.140 ([87814]) X-Attribution: os X-Face: "HgH2sgK|bfH$; PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6; Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:w4bDicO3FMKTw5TCgFvDh8Oowoh9woDCmB/CkgAuwrrDng== Original-Xref: shelby.stanford.edu gnu.emacs.help:120621 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16568 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16568 tennis_smith@yahoo.com (Tennis Smith) writes: > Anyone have code that will force a re-read of a "local variables:" > sections in a file? > > I have several files with this sort of data appended at the bottom: > > # ----------------------------------------------------------------------------- > # ;;; Local Variables: *** > # ;;; mode: tcl *** > # ;;; project: SUMCHK *** > # ;;; End: *** > > If I change the "project" var in the file, is there a way to have > emacs reread this? If your auto-mode detection is set up correctly and if you don't have important buffer-local variables other than those in the “Local Variables” section, you can just do M-x normal-mode RET. I mention these two “ifs” above, because as far as buffer variables are concerned this has basically the same effect as killing the buffer and re-visiting it. Btw, you probably know this, but if ‘#’ is the comment character of your language, you can just write: # Local Variables: # mode: tcl # project: SUMCHK # End: Oliver -- 14 Pluviôse an 212 de la Révolution Liberté, Egalité, Fraternité!