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

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

Re: how to reference the current *.el file in elisp


From: jidanni
Subject: Re: how to reference the current *.el file in elisp
Date: Thu, 02 Jul 2009 20:48:20 +0800

># compile-command: (concat "blarfowitz --nizbotize " buffer-file-name)
> without being asked about risky variables, or hard wiring buffer-file-name?
<The warning isn't about buffer-file-name, it's about compile-command.
<It warns if you try to set it to something other than a string.  In your
<case, you're trying to set it to a list.
All I know is: concat is a built-in function in `C source code'.
  Concatenate all the arguments and make the result a string.
<Values in the local variables stanza aren't evaluated, they're treated
<as literals.  So there's no referring possible.
Is too. buffer-file-name does get evaluated. But it causes a y-or-n-p.
<This is why hooks are usually more appropriate for complex things like
<this.  If you really do need a special compile-command just for one
<specific file, you'll have to hard-code the file's name into it, e.g.
<# compile-command: blarfowitz --nizbotize myscript.sh
No, I want to make a template, e.g.,
# Local Variables:
# compile-command: "php --syntax-check LocalSettings.php"
# End:
for some, but not all (hence hook no good) php files, without having to
hardwire the filename.




reply via email to

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