From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#75310: Eliminate obsolete alias warning Date: Sat, 04 Jan 2025 22:03:42 +0200 Message-ID: <86cyh2bb35.fsf@gnu.org> References: <86h66ggl6a.fsf@gnu.org> <02134785-ad5d-8b9a-4b51-64e8d466b038@mavit.org.uk> <86bjwogewx.fsf@gnu.org> <868qrrhq8h.fsf@gnu.org> <77CBB14F-094D-48DA-A7D1-ED9E1F43DAD3@gmail.com> <86a5c7f0dn.fsf@gnu.org> <94CBEFD3-6E58-4056-B73C-B5FC6AB6E1B9@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5704"; mail-complaints-to="usenet@ciao.gmane.io" Cc: p.d.oliver@mavit.org.uk, 75310@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 04 21:05:24 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tUAOi-0001JC-1U for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 21:05:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUAON-000670-S5; Sat, 04 Jan 2025 15:05:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUAOM-00065h-Ek for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 15:05:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUAOM-0002xi-5b for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 15:05:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=UboPmALprhfhKovK+0t+HfG0tJlMsuTWi0lF6cUyjbw=; b=uHpLAE9jj8Oy5sgovdc4tcvQOlfM01MtAfDEeu7I/fCJqBiCo/cHZuAZbdZ0z1fioDuqTuezD5Pzi5nOY5YZJ+QmQv17SEIrmQi46S3Tha+SY46Dj0FE0sUKeT0vz7G3BP/4PrGVjY+yTL4eglVt2ukLwquJSNXsFoTtl1JdwP8qfYOfwPO56r5p6QSH2kEf3TEDkt6z8kMzqh3fJngTQQ38iIlpEK3rWIxOS1d90gWe7aaq/d4PiunCckFHI7KOuUzj6holt5bAEcXCrKngc/sm1FykDySqkWSs0qUdn1Z3Oi7ce7C4due5BOLqFGhrZ/yD8q3jRNqdsEXj/5r2gw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUAOL-0002AJ-W7 for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 15:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2025 20:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75310 X-GNU-PR-Package: emacs Original-Received: via spool by 75310-submit@debbugs.gnu.org id=B75310.17360210658263 (code B ref 75310); Sat, 04 Jan 2025 20:05:01 +0000 Original-Received: (at 75310) by debbugs.gnu.org; 4 Jan 2025 20:04:25 +0000 Original-Received: from localhost ([127.0.0.1]:57523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUANk-00029D-Nu for submit@debbugs.gnu.org; Sat, 04 Jan 2025 15:04:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53904) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUANi-000290-Hi for 75310@debbugs.gnu.org; Sat, 04 Jan 2025 15:04:23 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUANb-0002td-9M; Sat, 04 Jan 2025 15:04:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=UboPmALprhfhKovK+0t+HfG0tJlMsuTWi0lF6cUyjbw=; b=mgozvfyxZwCQVNZ31n1Y waveGcEROBC2AeVRYcoKQaEdny/C1wu2d7AfT2rJ6n2IccbVSOFjw4HcreEFe+GSlGyVk3ZpgU804 7+uqiL/Kq1bDxqIxaOqQvDXLPVaKEtZzcumMbAGzCFZ/jB9QW+mfUcyAeFQ3uvonQerpwiSkHuHxm PrdwIxfYJmK3/3rh6IoF+hPEnBG9TaE0Lgy9aPaP3pXqwNN4cb8CYCSz9yrYM8U87susigE75lV9f AMUhj4OChvExNPo1xnE9C2bY1nXZMS2oIqRdIOa2SrsoGdN7keywrJ4ZWqTdVYeL7tifBDuP3Puiq zpYHoJ2FJOSjWQ==; In-Reply-To: <94CBEFD3-6E58-4056-B73C-B5FC6AB6E1B9@gmail.com> (message from Yuan Fu on Sat, 4 Jan 2025 11:26:38 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298466 Archived-At: > From: Yuan Fu > Date: Sat, 4 Jan 2025 11:26:38 -0800 > Cc: Peter Oliver , > 75310@debbugs.gnu.org > > > > > On Jan 4, 2025, at 12:29 AM, Eli Zaretskii wrote: > > > >> From: Yuan Fu > >> Date: Fri, 3 Jan 2025 23:33:25 -0800 > >> Cc: Peter Oliver , > >> 75310@debbugs.gnu.org > >> > >>> On Jan 3, 2025, at 7:27 AM, Eli Zaretskii wrote: > >>> > >>>> Date: Fri, 3 Jan 2025 14:47:53 +0000 (GMT) > >>>> From: Peter Oliver > >>>> cc: 75310@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? You get deprecation message in what scenario? If you see Package cl is deprecated when you load cl, that's expected, and cannot be shut up. The message we want to avoid is this: lisp/treesit.el: Warning: ‘loop’ is an obsolete alias (as of 27.1); use ‘cl-loop’ instead. Are you still seeing it after the change?