emacs-devel
[Top][All Lists]
Advanced

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

Re: [NonGNU ELPA] 11 new packages!


From: Akib Azmain Turja
Subject: Re: [NonGNU ELPA] 11 new packages!
Date: Tue, 29 Nov 2022 02:32:55 +0600

Philip Kaludercic <philipk@posteo.net> writes:

> Akib Azmain Turja <akib@disroot.org> writes:
>
>>>> @@ -3788,17 +3802,15 @@ DATA is the selection data encoded in base64."
>>>>                                        (rx ?\\))
>>>>                                      output index)))
>>>>             (if (not match)
>>>> -               (progn
>>>> -                 ;; Not found, store the text to process it later when
>>>> -                 ;; we get the end of string.
>>>> -                 (setf (eat--t-term-parser-state eat--t-term)
>>>> -                       `(,state ,(concat buf (substring output
>>>> -                                                        index))))
>>>> -                 (setq index (length output)))
>>>> +               ;; Not found, store the text to process it later when
>>>> +               ;; we get the end of string.
>>>> +               (setf (eat--t-term-parser-state eat--t-term)
>>>> +                     `(,state ,(concat buf (substring output
>>>> +                                                      index)))
>>>> +                     index (length output))
>>>>               ;; Matched!  Get the string from the output and previous
>>>>               ;; runs.
>>>> -             (let ((str (concat buf (substring output index
>>>> -                                               match))))
>>>> +             (let ((str (concat buf (substring output index match))))
>>>>                 (setq index (match-end 0))
>>>>                 ;; Is it really the end of string?
>>>>                 (if (and (= (aref output match) ?\\)
>>>
>>> Somehow I prefer to use one setq for each variable.  Is setting multiple
>>> at once faster?  Benchmarking with "benchmark"...  Yes, about 1.5 times.
>>> TODO.
>>>
>>
>> Done, but I didn't combine setf and setq, only two setq's or two setf's.
>
> Any reason why not?
>

Not any solid reason.  I prefer to use 'setf' only with generalized
variables, and 'setf' expands to 'setq' anyway for symbols.

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

Attachment: signature.asc
Description: PGP signature


reply via email to

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