[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47454: plist-put should have a version which accepts multiple proper
From: |
Lars Ingebrigtsen |
Subject: |
bug#47454: plist-put should have a version which accepts multiple properties |
Date: |
Tue, 18 May 2021 18:13:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
scame <laszlomail@protonmail.com> writes:
> Modifying plists could be much easier if multiple properties
> were also accepted.
>
> E.g. (plist-put PLIST PROP VAL ... )
>
> or (plist-put PLIST (PROP VAL ....) )
>
> Others also find this problematic:
>
> https://emacs.stackexchange.com/questions/39473/how-to-modify-multiple-keys-in-a-plist
>
> and the suggessted solutions are clumsy:
>
> (setq org-format-latex-options (plist-put org-format-latex-options :scale
> 1.5))
> (setq org-format-latex-options (plist-put org-format-latex-options
> :foreground 'auto))
Well... pretty much any key/value storage function works like this --
for instance, you can't put more than one key/value into a hash table
with puthash. puthash does have the advantage that you don't have to
setq the variable, so it's somewhat less verbose.
(setf (seq-elt plist ...))
may help with that, though.
In any case, I don't think extending plist-put (or adding a new function
to take a list would be that useful, so I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#47454: plist-put should have a version which accepts multiple properties,
Lars Ingebrigtsen <=