[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34130: bug#6615: bug#34130: Specifying File Variables: mention why c
From: |
Robert Pluim |
Subject: |
bug#34130: bug#6615: bug#34130: Specifying File Variables: mention why can't specify "current file" |
Date: |
Wed, 02 Oct 2019 13:48:28 +0200 |
>>>>> On Wed, 02 Oct 2019 03:44:37 +0800, 積丹尼 Dan Jacobson
>>>>> <jidanni@jidanni.org> said:
>>>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:
LI> Eli Zaretskii <eliz@gnu.org> writes:
>>>> On (info "(emacs) Specifying File Variables")
>>>> at
>>>>
>>>> # Local Variables:
>>>> # compile-command: "cc foo.c -Dfoo=bar -Dhack=whatever \
>>>> # -Dmumble=blaah"
>>>> # End:
>>>>
>>>> do also mention why there is absolutely no way to say "<<<current
file>>>",
>>>> $$$${current_file} etc. if one wanted to, instead of needing to
hardwire
>>>> the filename (foo.c) of the file (foo.c) into the file (foo.c) itself!
Thanks.
>>>
>>> Is something wrong with using buffer-file-name? You could create
>>> compile-command by using 'eval', which can accept Emacs functions.
LI> Indeed, so I don't think there's anything here to be fixed. Closing.
積丹尼> eval needs to be whitelisted as a safe local variable, creating a
security hole.
How about this instead:
before-hack-local-variables-hook is a variable defined in `files.el'.
Its value is (c-before-hack-hook)
This variable may be risky if used as a file-local variable.
Probably introduced at or before Emacs version 23.1.
Documentation:
Normal hook run before setting file-local variables.
It is called after checking for unsafe/risky variables and
setting `file-local-variables-alist', and before applying the
variables stored in `file-local-variables-alist'. A hook
function is allowed to change the contents of this alist.
This hook is called only if there is at least one file-local
variable to set.
- bug#6615: bug#34130: Specifying File Variables: mention why can't specify "current file", Lars Ingebrigtsen, 2019/10/01
- Message not available
- bug#6615: bug#34130: Specifying File Variables: mention why can't specify "current file", 積丹尼 Dan Jacobson, 2019/10/01
- bug#34130: bug#6615: bug#34130: Specifying File Variables: mention why can't specify "current file",
Robert Pluim <=
- bug#34130: bug#6615: bug#34130: Specifying File Variables: mention why can't specify "current file", 積丹尼 Dan Jacobson, 2019/10/02
- bug#34130: bug#6615: bug#34130: Specifying File Variables: mention why can't specify "current file", Robert Pluim, 2019/10/03
- bug#34130: bug#6615: bug#34130: Specifying File Variables: mention why can't specify "current file", 積丹尼 Dan Jacobson, 2019/10/04
- bug#34130: bug#6615: bug#34130: Specifying File Variables: mention why can't specify "current file", Robert Pluim, 2019/10/04
- bug#34130: bug#6615: bug#34130: Specifying File Variables: mention why can't specify "current file", 積丹尼 Dan Jacobson, 2019/10/04