[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist
From: |
Stefan Monnier |
Subject: |
bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist |
Date: |
Tue, 18 Oct 2022 09:25:26 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>> I think the above is better written:
>>
>> ((nil
>> (tab-width . 8)
>> (sentence-end-double-space . t)
>> (fill-column . 70)
>> (emacs-lisp-docstring-fill-column . 65)
>> (vc-git-annotate-switches . "-w")
>> (bug-reference-url-format . "https://debbugs.gnu.org/%s")
>> (diff-add-log-use-relative-names . t))
>> (c-mode
>> (c-file-style . "GNU")
>> (c-noise-macro-names . ("INLINE" "ATTRIBUTE_NO_SANITIZE_UNDEFINED"
>> "UNINIT" "CALLBACK" "ALIGN_STACK"))
>> (electric-quote-comment . nil)
>> (electric-quote-string . nil)
>> (indent-tabs-mode . t)
>> (mode . bug-reference-prog)))
>
> So the dotted pair notation should be avoided only at the first level.
That's one way to look at it.
The other is that the dotted syntax doesn't make much sense when what
you have after the `.` is always a list.
> Then what about making it closer to the syntax of display-buffer-alist rules
> where CONDITION is passed to buffer-match-p that can match not only
> major-mode,
> but also a regular expression of a buffer name.
No opinion on that. But indeed, it could be useful to specify a kind of
local `auto-mode-alist` additions.
>
>> Maybe something like:
>>
>> (c-mode
>> (:set c-file-style "GNU")
>> (:set treesit-thing t)
>> (:set odd-list (cons 3 odd-list))
>> (:minor-mode indent-tabs-mode -1) ;; Disable
>> (:minor-mode blink-parentheses-mode))
>
> The drawback of the current syntax is that `mode` and `eval`
> are used like variables, but really are keywords. Using the
> keyword syntax `:` will help to resolve this ambiguity.
I think that's minor. The fact that it only contains values rather than
(safely computable) expressions is the more problematic part.
> Also should file-local variables support the same :keyword syntax?
I don't think there's as much need for changes there, so I'd rather wait
for the dir-locals part to stabilize before trying to see if/how to move
it over to file-local variables.
Stefan
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, (continued)
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Lars Ingebrigtsen, 2022/10/16
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Stefan Kangas, 2022/10/15
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Stefan Monnier, 2022/10/15
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Lars Ingebrigtsen, 2022/10/16
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Philip Kaludercic, 2022/10/16
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Lars Ingebrigtsen, 2022/10/16
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Stefan Monnier, 2022/10/16
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Lars Ingebrigtsen, 2022/10/16
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Stefan Monnier, 2022/10/18
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Juri Linkov, 2022/10/18
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist,
Stefan Monnier <=
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Stefan Monnier, 2022/10/14
- bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist, Philip Kaludercic, 2022/10/14
- bug#58486: [PATCH] Prevent .dir-locals.el from being byte-compiled, Stefan Monnier, 2022/10/14
- bug#58486: [PATCH] Prevent .dir-locals.el from being byte-compiled, Juri Linkov, 2022/10/15
- bug#58486: [PATCH] Prevent .dir-locals.el from being byte-compiled, Stefan Monnier, 2022/10/16
bug#58486: [PATCH] Prevent .dir-locals.el from being byte-compiled, Lars Ingebrigtsen, 2022/10/13