GNU bug report logs -
#75310
Eliminate obsolete alias warning
Previous Next
Full log
Message #34 received at 75310 <at> debbugs.gnu.org (full text, mbox):
> On Jan 4, 2025, at 11:26 AM, Yuan Fu <casouri <at> gmail.com> wrote:
>
>
>
>> On Jan 4, 2025, at 12:29 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>
>>> From: Yuan Fu <casouri <at> gmail.com>
>>> Date: Fri, 3 Jan 2025 23:33:25 -0800
>>> Cc: Peter Oliver <p.d.oliver <at> mavit.org.uk>,
>>> 75310 <at> debbugs.gnu.org
>>>
>>>> On Jan 3, 2025, at 7:27 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>>>
>>>>> Date: Fri, 3 Jan 2025 14:47:53 +0000 (GMT)
>>>>> From: Peter Oliver <p.d.oliver <at> mavit.org.uk>
>>>>> cc: 75310 <at> debbugs.gnu.org
>>>>>
>>>>> On Fri, 3 Jan 2025, Eli Zaretskii wrote:
>>>>>
>>>>>> IOW, can you show a minimal recipe for reproducing the problem,
>>>>>> starting from "emacs -Q"?
>>>>>
>>>>> $ src/emacs -Q --batch --eval "(progn (message emacs-version) (require 'cl) (require 'treesit))"
>>>>> 31.0.50
>>>>> Package cl is deprecated
>>>>> lisp/treesit.el: Warning: ‘loop’ is an obsolete alias (as of 27.1); use ‘cl-loop’ instead.
>>>>
>>>> Thanks.
>>>>
>>>> Yuan, I think it would be good to rename 'loop' there to some other
>>>> name, do you agree?
>>>
>>> I would definitely agree. I’ve always used cl-loop (and now I try to not use it for new code). The only instance of “loop” I can find in treesit.el is in a named-let in treesit-transpose-sexps wriiten by Theo, and it’s not the CL loop but a local function defined by named-let. I wanted to rewrite it so it doesn’t use named-let because it’s not very readable, but tbh I haven’t find the time to understand that function well enough to rewrite it (because it’s not very readable :-)
>>>
>>> It could be that only I can’t understand it, but code should be simple enough that even I can understand ;-)
>>
>> Renaming the symbol is easy, and doesn't require you to understand the
>> code completely. We don't have to use cl-loop.
>
> Ah right, duh :-) Though I renamed the symbol and still gets the deprecation message. There’s no other “loop” in treesit.el, only cl-loop. Could you maybe take a look?
Never mind, the deprecation message is from requiring cl. The obsolete alias error is fixed by renaming the symbol.
Yuan
This bug report was last modified 138 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.