bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#30235: [patch] undo-tree byte-compiler warnings


From: Basil L. Contovounesios
Subject: bug#30235: [patch] undo-tree byte-compiler warnings
Date: Tue, 25 Jun 2019 14:32:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Alex Branham <alex.branham@gmail.com> writes:
>
>> I'm not sure if this is the right place to submit patches for ELPA
>> packages, but I couldn't find anywhere else to go. Let me know if this
>> should go some place else.
>>
>> This patch silences several byte compiler warnings, mostly having to do
>> with unused lexical variables in loops.
>
> The unused dolist fixes look OK, but they could also be rewritten as
>
> (cl-loop repeat ...
>          do ...)
>
> to avoid the binding altogether.

There's really no need to completely rewrite all those dotimes in terms
of cl-loop.  Writing (dotimes (_ ...) ...) is quite common and fine.

> The other changes (time-subtract/subtract-time) I'm not so sure about,
> because ELPA things are supposed to work across a large number of Emacs
> versions, and time-subtract is newer than subtract-time.

Sure, but subtract-time has been called time-subtract for almost two
decades now[1].

[1: 74fcda73dd]: Add autoload cookies.  Many doc fixes.
  2002-01-27 23:30:29 +0000
  
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=74fcda73dd8743f66256aa5fdaff6260dc356c54

> The same with the other obsolete functions -- you're bound to get those
> warnings in ELPA packages.

Sure, but often a compatibility shim can go a long way, and in this case
the question is why was undo-elt-crosses-region obsoleted as part of
bug#17235, and what should undo-tree.el do in future Emacs versions.

Maybe Barry, Toby, or Stefan should be CCed in this or a new discussion
about it, seeing as Jonas' concerns were never addressed, AFAICT.

Thanks,

-- 
Basil





reply via email to

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