GNU bug report logs -
#74267
29.4; Doc string of `add-file-local-variable`
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Fri, 8 Nov 2024 21:26:02 UTC
Severity: minor
Found in version 29.4
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 74267-done <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 8 Nov 2024 21:25:01 +0000
> From: Drew Adams via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> The doc string doesn't make clear that it adds the variable
> at the end of the file, and not on the first line (as a cookie). This
> is important in the case of a variable, such as `lexical-binding', that
> must be added to the first line.
>
> See, for example, this question:
>
> https://emacs.stackexchange.com/q/82549/105
>
> The user tried `M-x add-file-local-variable' and didn't understand the
> error message, especially because point was at bob:
>
> user-error: The 'lexical-binding' variable must be set at the start of the file
>
> The Emacs manual, node Specifying File Variables makes everything clear.
> But please clarify the doc string of `add-file-local-variable'.
The main problem is not the doc string, but the text of the user-error
message.
Thanks, fixed, and closing the bug.
This bug report was last modified 192 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.