From: Phil Sainty <psainty@orcon.net.nz>
To: Juri Linkov <juri@linkov.net>, 32817@debbugs.gnu.org
Subject: bug#32817: 27.0.50; Dotted pair syntax for directory-local variables
Date: Wed, 26 Sep 2018 00:10:06 +1200 [thread overview]
Message-ID: <87fa2b5f-48b3-703b-9b0b-43dc454759b8@orcon.net.nz> (raw)
In-Reply-To: <87bm8nolge.fsf@mail.linkov.net>
Hi Juri,
On 24/09/18 11:14, Juri Linkov wrote:
> As indicated in https://lists.gnu.org/archive/html/emacs-devel/2018-09/msg00817.html
> the current syntax is confusing.
>
> This patch fixes add-dir-local-variable to output syntax corresponding
> to examples in (info "(emacs) Directory Variables"):
Thanks for implementing this.
> +(defun add-dir-local-variables-to-string (variables)
`add-dir-local-variables-to-string' is quite a confusing name.
It makes it sound like the dir-local variables will be added to
a string (which doesn't make a lot of sense), when it's actually
formatting all of the dir-locals *as* a string.
This is on account of the "add-" prefix, which I think is unnecessary
-- the functionality isn't really tied to `add-dir-local-variable';
it would work regardless of where its argument came from.
`dir-locals-to-string' seems a better name to me, and is consistent
with other dir-locals-* functions.
I think it should also have a docstring.
> + (format "(%s)" (mapconcat
> + (lambda (mode-variable)
"mode-variables" (plural), I think.
> + (format "(%S . %s)"
> + (car mode-variable)
> + (format "(%s)" (mapconcat
> + (lambda (variable-value)
> + (format "(%s . %S)"
> + (car variable-value)
Why is the variable symbol "%s" when the mode symbol was "%S" ?
> + (cdr variable-value)))
> + (cdr mode-variable) "\n"))))
> + variables "\n")))
regards,
-Phil
next prev parent reply other threads:[~2018-09-25 12:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-23 23:14 bug#32817: 27.0.50; Dotted pair syntax for directory-local variables Juri Linkov
2018-09-25 12:10 ` Phil Sainty [this message]
2018-09-25 19:41 ` Juri Linkov
2018-09-26 15:01 ` Phil Sainty
2018-09-26 15:50 ` Eli Zaretskii
2018-09-27 0:09 ` Juri Linkov
2018-09-27 6:47 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fa2b5f-48b3-703b-9b0b-43dc454759b8@orcon.net.nz \
--to=psainty@orcon.net.nz \
--cc=32817@debbugs.gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.