[Top][All Lists]

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

Re: make a drawing with Emacs

From: Tomas Hlavaty
Subject: Re: make a drawing with Emacs
Date: Thu, 03 Sep 2020 20:23:36 +0200

On Thu 03 Sep 2020 at 19:45, Lars Magne Ingebrigtsen <> wrote:
> Stefan Monnier <> writes:
>> IIRC it would make the code slower, tho.  It adds code like
>>     (let ((stroke-color (cadr (plist-member args :stroke-color))))
>> which the compiler fails to optimize away when `stroke-color` is not used.
> I didn't know that...  but on the other hand, all these functions end up
> calling this internal function:
> (defun svg--arguments (svg args)
>   (let ((stroke-width (or (plist-get args :stroke-width)
>                         (dom-attr svg 'stroke-width)))
>       (stroke-color (or (plist-get args :stroke-color)
>                           (dom-attr svg 'stroke-color)))
>         (fill-color (plist-get args :fill-color))
>       attr)
> Which could then lose these plist-gets, so we'd end up with
> approximately the same slowness, I think.  :-)

&allow-other-keys does not make sense for functions.

svg--arguments is called in 9 places.  Should it be possible to identify
all relevant keys for each use-case or is that not reasonable for svg?

reply via email to

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