From: tfb@hurricane.OCF.Berkeley.EDU (Thomas F. Burdick)
Subject: Re: Reparsing local variables without reopening file?
Date: 22 Sep 2002 10:42:23 -0700 [thread overview]
Message-ID: <xcvheghsyyo.fsf@hurricane.OCF.Berkeley.EDU> (raw)
In-Reply-To: 87d6r7w3yy.fsf@bach.composers
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.
Come to think of it, that would be a nice thing to have as a command,
wouldn't it? But hack-local-variables is the function that gets
called when you find-file a file, so you can just put this in your
.emacs:
(defun my-reparse-local-variables ()
(interactive)
(hack-local-variables))
(global-set-key ... #'my-reparse-local-varaibles)
--
/|_ .-----------------------.
,' .\ / | No to Imperialist war |
,--' _,' | Wage class war! |
/ / `-----------------------'
( -. |
| ) |
(`-. '--.)
`. )----'
next prev parent reply other threads:[~2002-09-22 17:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-21 19:13 Reparsing local variables without reopening file? Ole Laursen
2002-09-21 22:27 ` Michael Slass
2002-09-22 17:42 ` Thomas F. Burdick [this message]
2002-09-24 20:22 ` Kevin Rodgers
2002-09-23 12:29 ` Peter Boettcher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xcvheghsyyo.fsf@hurricane.OCF.Berkeley.EDU \
--to=tfb@hurricane.ocf.berkeley.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).