GNU bug report logs -
#48030
28.0.50; syntax evaluation in strings
Previous Next
Reported by: markusffm <at> fn.de
Date: Mon, 26 Apr 2021 08:57:02 UTC
Severity: normal
Tags: notabug
Found in version 28.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 48030 <at> debbugs.gnu.org (full text, mbox):
>
> defining a function:
> (defun xxx-insert()
> "anything"
> (interactive)
> (insert "# Local Variables:\n")
> (insert "# mode: org\n")
> (insert "# End:\n")
> )
> will cause Emacs to disregard the Emacs-lisp-mode after re-opening the
> file, hence no syntax evaluation anymore Changing (insert "# Local
> Variables:\n") to (insert "# Local Bariables:\n") will 'solve' the
> problem.
>
Thanks for your bug report. As far as I can see, this is not a bug, when
enable-local-variables is t (the default), Emacs searches for the the
string "Local Variables" string near the end of the buffer, and interprets
what follows as file-local variable settings.
This is not what you want if "Local Variables" is inside a literal string,
but detecting that specific case would be cumbersome I think. I would
suggest that you replace (insert "# Local Variables:\n") by (insert "#
Local " "Variables:\n"), with two additional quotation marks between Local
and Variables.
This bug report was last modified 4 years and 27 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.