[ale] [Slightly OT] Emacs question.
Michael B. Trausch
fd0man at gmail.com
Tue Sep 26 12:03:58 EDT 2006
Michael B. Trausch wrote:
>
> Anybody know how to do what I am trying to do, or, even better, what the
> little setting line in a typical text file is so that I can look up what
> the options are for it? I so far have not happened across it by chance,
> and searching has yielded me nothing but TONS of informational tidbits
> like "'M-x display-time' turns on a neato clock with system load!" but
> nothing about using -*- in emacs files. (Actually, I think I learned
> about that by seeing another file in a project somewhere use it... but I
> don't remember where now...)
>
Eh, I finally found it. It seems to be referred to as the "magic first
line", though it can also be referred to as a file's local variable
list. I found out how to do what I wanted to do, sort of; with
sql-mode, to set it up to use the right recursive mode you can do:
-*- mode: sql; sql-product: postgres; -*-
Now I am just left with figuring out some of the other things about
Emacs in general that I have not learned yet. :-P It seems to only
work because the sql-mode module defines that as a variable that it can
act on, or something like that. I just happened to see it in my
sql-mode.elc file (which, to my surprise, is not as unreadable as I
thought it might be; I did a cat on it and meant to do strings, because
I thought it was compiled, and sure enough, it is not compiled in the
traditional sense of the word) and tried it, after finding the part in
the Emacs info manual about Local Variables in Files.
Sometimes, the simplest features are not the simplest ones to get help
with... :-)
- Mike
--
"Fate: Protects fools, children, and ships called /Enterprise/."
-- William T. Riker, ST:TNG, "Contagion"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
More information about the Ale
mailing list