emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two problems with directory-local variables


From: Stefan Monnier
Subject: Re: Two problems with directory-local variables
Date: Mon, 17 Sep 2018 22:15:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> On this note, while I don't use the commands myself, I've often wished
>> that add-dir-local-variable would generate the dotted-pair syntax,
>> because I've often seen confusion about the syntax of dir-locals arising
>> from dotted vs non-dotted possibilities, and I feel strongly that the
>> dotted syntax is the most readable for these files.

Agreed.  We should probably have a `print-alist` kind of function for
that purpose and then try and make use of it from add-dir-local-variable.

> I don't know if something exists that could allow printing dotted syntax for
>
>   (pp-to-string '(eval message "hello"))
>
> In its implementation I see the references to print-escape-newlines
> and print-quoted, but there is no print-dotted.

I don't think we could add a print-dotted because as you say we don't
want (eval . (message . ("hello" . nil))) and only the human coder can
know which cons cell should be printed dotted and which shouldn't.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]