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

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

Re: Reparsing local variables without reopening file?


From: Michael Slass
Subject: Re: Reparsing local variables without reopening file?
Date: Sat, 21 Sep 2002 22:27:32 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Ole Laursen <olau@hardworking.dk> writes:

>Hi
>
>I was changing a local variable for a test example when it occurred to
>me that I didn't know how to make Emacs reparse them. For example:
>
>  // Local Variables: ***
>  // compile-command: "g++ test.cpp -o test -O3" ***
>  // End: ***
>
>Now, one can save and kill the buffer and refind the file (or perhaps
>even do a M-x revert-buffer); however, this seems silly. M-x apropos
>gives hack-local-variables. But that is a function? What do the gurus
>do? Or should hack-local-variables be a command (perhaps with a
>somewhat more descriptive name :-)? Typing M-: (hack-local-variables)
>is a little laborious.

A faster way to do that is with find-alternate-file (usually bound to
C-x C-v) and then accept the default which will be the file you're
currently visiting.  This will re-load the file from disk, re-start
the appropriate mode, and eval the local variables.

That doesn't address your point of any other way to do it, but makes
your way easier to do.

BOL

-- 
Mike Slass


reply via email to

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