[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file lo
From: |
Eli Zaretskii |
Subject: |
bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables |
Date: |
Sun, 25 Jun 2023 18:02:56 +0300 |
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: LdBeth <andpuke@foxmail.com>, 64272@debbugs.gnu.org
> Date: Sun, 25 Jun 2023 09:37:31 -0400
>
> > I'm not sure we want to support this outside of a Lisp comment.
> > Stefan, WDYT? Could false positives cause harm?
>
> I'd much rather we try and stay as close as possible to the behavior of
> `hack-local-variables-prop-line`
Right, but that doesn't require the -*- line to be a comment:
(goto-char (point-min))
(let ((end (set-auto-mode-1))
result)
(cond ((not end)
nil)
((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)")
;; Simple form: "-*- MODENAME -*-".
(if (eq handle-mode t)
(intern (concat (match-string 1) "-mode"))))
(t
;; Hairy form: '-*-' [ <variable> ':' <value> ';' ]* '-*-'
;; (last ";" is optional).
;; If HANDLE-MODE is t, just check for `mode'.
;; Otherwise, parse the -*- line into the RESULT alist.
The fact that most -*- lines are in comments is because they are in
program source files, so we need to hide them from the compiler or the
interpreter.
Am I missing something?
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, LdBeth, 2023/06/24
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, Eli Zaretskii, 2023/06/24
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, Stefan Monnier, 2023/06/24
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, LdBeth, 2023/06/24
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, Eli Zaretskii, 2023/06/25
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, Stefan Monnier, 2023/06/25
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables,
Eli Zaretskii <=
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, Stefan Monnier, 2023/06/25
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, LdBeth, 2023/06/25
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, Eli Zaretskii, 2023/06/25
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, Stefan Monnier, 2023/06/25
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, LdBeth, 2023/06/25
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, Eli Zaretskii, 2023/06/26
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, Gregory Heytings, 2023/06/26
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, Eli Zaretskii, 2023/06/26
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, Eli Zaretskii, 2023/06/26
- bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables, LdBeth, 2023/06/25