From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jaft Newsgroups: gmane.emacs.bugs Subject: bug#58864: 29.0.50; Warning when compiling emacs-lisp/hierarchy.el Date: Sun, 30 Oct 2022 07:26:34 +0000 (UTC) Message-ID: References: <86k04ion7u.fsf@gnu.org> <8335b6iyrr.fsf@gnu.org> Reply-To: Jaft Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2035026_1648988568.1667114794950" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35490"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "58864@debbugs.gnu.org" <58864@debbugs.gnu.org> To: Arash Esbati , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 30 08:28:20 2022 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 1op2jz-000927-T5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Oct 2022 08:28:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1op2jk-00015Z-3Y; Sun, 30 Oct 2022 03:28:04 -0400 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 1op2ji-00015C-0A for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 03:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1op2jh-0007FL-Oj for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 03:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1op2jh-0000oe-K1 for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 03:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jaft Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Oct 2022 07:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58864 X-GNU-PR-Package: emacs Original-Received: via spool by 58864-submit@debbugs.gnu.org id=B58864.16671148263070 (code B ref 58864); Sun, 30 Oct 2022 07:28:01 +0000 Original-Received: (at 58864) by debbugs.gnu.org; 30 Oct 2022 07:27:06 +0000 Original-Received: from localhost ([127.0.0.1]:37250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1op2ik-0000nN-Ca for submit@debbugs.gnu.org; Sun, 30 Oct 2022 03:27:06 -0400 Original-Received: from mail-mw2nam10olkn2084.outbound.protection.outlook.com ([40.92.42.84]:45473 helo=NAM10-MW2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1op2id-0000ml-J1 for 58864@debbugs.gnu.org; Sun, 30 Oct 2022 03:27:00 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nqsYaqRcF32x5RexBx2QH2p/eCec82v7uR8hpcYh2cAnE1eesY3fMqU9/Lk2dGd6vAH+lLmK6NgVO/g7bAdT8SMZeruJOPc23/VuldIWVXkSjPn1fVn9hzN9kigZwAfIHFmV4/mO84WzBbntETRqMAmzNQ6yVOuoRap0rsSn9tcTSHfcE+bD39yKjirHkxVFG/XWjGRlk0ik4MFoVZIPKK8aIELarfcn931Wpz0Tg4wi09RQ+zs1wlIcqpvSeVgeGqfwdyxbHFYa6kF/o2oJLDG3/AR99h1KhxuMvj8F70Y0xUM8fd4SCquMVJVLg5p8P+YDATugn+TlMXw4Tdp9tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Jo6U6OpJqL5R5q2fWLkD3cAvbokPcKjKjBQkszQ5FFc=; b=aimNOtNdvkiAd0uj+WxfiUOElBre6LL29NUza38AzD6Dfmu4VlJf7iS1aoImdv2wQjf58b+E1e2RvA4MWFuKAqYtlWgYLfvJDbLvCB3KxC/X9g3xvIZxD9CA0AYM5Jhzym2nD9Uslo7fQidVbeDlUSD0/ytNL4hd1uJnCrzPh32tcO3miTPmJWlukhJLfaxPXsdAE9q4lSQXXouY5G6m0Ty/jkOqW14c4SubS0U7UxRi7+ZNiKCoAXMQH9gFaYsdrrk5l2dexqjTTwwLuXZlMWhKeoxhqVySg/4iPJHrfMnAK93imRxoyTk1QQrOPF39jySPooJ0Q2JsYBs6n/gddQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jo6U6OpJqL5R5q2fWLkD3cAvbokPcKjKjBQkszQ5FFc=; b=i07qhSa5wKcisW5CeaxFO7ireLVFLii2tQvY8K8chdSI3xqo4YwAoi1VHZiDe3Tj+RaNqd4Y6bMFP6q2SrPYIMuAH4eFXuRRXfvxmg0OEccJRxvUkot0wdxFZUW1i/0gVy7WCTqEUI1EpNBJURI1ShtwZu2XfkFMwnL9QGVYaaDv4xdCM9CKNQJxFpoY4LkhwAFbcESYDkxr8CLMhTXy5HWl8O5zAH8SXlDNpYywMc8ZVkql62jCH+KkQPPkGu3T4K6AoutUkyYJOlSrLynTHoJDVBpJJC4r3uEZ+iDJBbEux1LGqD8ke8SE657JHxVMOs/yZqdZDDjzNBbKfn9dbQ== Original-Received: from BY5PR07MB7029.namprd07.prod.outlook.com (2603:10b6:a03:1f0::20) by DM6PR07MB6362.namprd07.prod.outlook.com (2603:10b6:5:179::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.16; Sun, 30 Oct 2022 07:26:48 +0000 Original-Received: from BY5PR07MB7029.namprd07.prod.outlook.com ([fe80::2453:1eb6:44a2:53c8]) by BY5PR07MB7029.namprd07.prod.outlook.com ([fe80::2453:1eb6:44a2:53c8%5]) with mapi id 15.20.5769.018; Sun, 30 Oct 2022 07:26:41 +0000 X-YMail-OSG: kt2dDeoVM1n2jPmLGJwxgF3unNkhgKP7HBVfXyXjl7ciNqeoNHxQmfjZy8A2pii J9EmEvFNeJVISHIGxR9u8to1hU1AtrkbVypCz73McYMz90ixFtA16OpsfKJWgzG7jRvI7AhRiPkb BStxcumuprlNR.NgtkIw4.4dsSy6w9lTGguZ5JMnjbdB6zMrw.AHVIqcDjgPMBYxkwnawP2FCGmV 3Lfesjdv_32bX0lGDQHtx.SsfxM1kJ9DSviWd6C.r0lc67Rr9EgV0mNToZHhgsdA0udnCoRgl7nD 8Et5yKafQkYkw_AdRIkmZ07i8TF15cuWEKS67V2GLEkjVbsqtVzUB0gXJF.d4JD8GngLyaO2ixKu jAeqFr2ua1H3Pru52NP5.ZGYRc2rYU6sCT5G6D7ZVoQjenYLFCBXqt9sONRDw84cHIUfZQOWIA8j 50haPH9uw2VDAFGVdnqq8rAl3UxQC.NARHtoKiAjyWIrDrPiuQhk445Oo2x3Kibv4mkhwkBxsoHt S34busagA9_p4Jd1Mmg2lQYJbQmnwOU2ISilYYW3KqAG.7.cpddW6o_AjSr22m_AcqkeNjOBCKnT BPYnQ7O8OzrAZT11gj4fy7u3qPrz2roy31Ex0ZDKKfYVpOSKfgs9wQ2Jn9w1RSvnU.gZkyXwqkdW xy_.2g1Uko0ybANIAdhkUtyOHM_S263oqwsE3_5IbhYPALLRErDXWvfSFXvOCloeDgkSjejQr9xO LBNCtFG4MC8LA7o._TJnTqgXOvnO18ffryHk4m4rgpC9ikYtT2YrvLN_mS8iuVTdJLbb.TlLC29g hjSNvCi1md3Skq2E1vFh2RxVnA95XqEEXIpFje_uY4 X-Sonic-MF: In-Reply-To: <8335b6iyrr.fsf@gnu.org> X-Mailer: WebService/1.1.20783 YMailNorrin X-TMN: [hMf88hyz6HPNPOjg3wkeHVmpKwrHHcOs] X-ClientProxiedBy: BL1PR13CA0185.namprd13.prod.outlook.com (2603:10b6:208:2be::10) To BY5PR07MB7029.namprd07.prod.outlook.com (2603:10b6:a03:1f0::20) X-Microsoft-Original-Message-ID: <85075835.2035027.1667114794952@mail.yahoo.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR07MB7029:EE_|DM6PR07MB6362:EE_ X-MS-Office365-Filtering-Correlation-Id: e4e48934-a0f5-40ee-22f6-08daba481646 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zpOXyqlaSVWDkHeD2+OSwen0VObW3lOGtS0D3kj6nvyfTQbk9EecFZRkRJ3UWhJhDJ4JGihepaRqDPig1Vr1O2egSbxzstWJFDzHgLDiA8p1yfD5yOfPQstFQrCu8wsDjDQ839Vxc8O+w2hbLepoGmDOBl5SApXv3zaZufTATh7iwPsN45aNg2rNbKvPcosndEncR4ZmLSdJKmUHSA9X6aMW5x/GnC2BRPhcmCc/BpBph9OYVuFBPAz2cJc0QZUpxg8eAfn/bEdN1m4Gf7OVM6O3qgz7CvE9bM+0SaI5JeMDYiSZxj+loG27NvjGqLCEa5JIb6iakc+jxnXn/yLkzFNmn0g4HadLWza03zW1VsDJTvzJI9BxyK7G9+Ey6MjSmued5oYBekClG5zOA4/3YLTTQ0Ku5aKb9vquWrL4a54huF6qO7bYQNiVPWdi9FgqAPMC1k/mfJeQCugKwyBICDcaHRngXgLvjPIz93Eov3A2I/jxmlqjtSxmGZ/y3brlqO8fzpC6GcUiag7L1vLVlfiRUx3HoMDirccX/yY6lZ5mhmmBdixb2Dw4fCtZVxfHfnuz5UaumLF6b7qpNPu+55yTjyELLN/bG7OG/EfdWIXK4N2rJb60j9IGRIWi0N2jL2kfCfu8qPZc7MsFbEpf+hqVsCiFh60hldxwIX/c2s8v97CjBlIDB5cG/qJwONjH X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /I9qim68KTWhP3moQNGu6x3+LBLajrbRc93vTcxYpR5V3DBtsKzafwMKfFoqb0Oa+bhpXpiOOwoJLtChbn24u2Ij6qTI4VrcvseGIfh3NA1wYMrYJR74zq7iDhsc4S666Hlu6HfC+kb4LniwA0/DvkqM+kYXGaHft5UmzXq9hpGDLun2Vu1H6/Ezde+RVACwvCJvNNTjq7lFuaXXoZNzdrF8yc7D1JR1WMg4MpENknxnfab6sBzNdTkqAldArjN0LZkx6GM17JPqffISq9fmFjRl0vrqmGOVEGcanCYbU+B6LwL+6cfjEjTqT85BoL5J65/UZABCs0I64kjNLJqA8NFtPFiOChRqjd2efqS9yFcpzJnMmkZMV7MvxCqujLAfitOucXF2WQFeEgreE8apFm610Hfu2h+dLLHKZlNOK2JP5wZtuJsHv7BYKzibCd7kcSD7sCl7v1TkyPsxpQNhNyIOYA424LhumvekWaDSZOq4hN+mjfmowG97si/nS49UU1KzXz50O+5ipq6Bktek9XPZRITO0P1APKXl4izvghJv7QunqMqh/g0n/fVPj/TA7J5LAcn2tL38tm2qlPXW2bw6cCwT5AkUZc0JqRWzmzyBFbLxwba/pNf9fXbJcvcYEmG6wbYqq1vxvpZPlvanZmlTR1F50sgtxbURM0JZoBQk9TayhsKDJwXCsSgeLAdjoX57pRVvDQth446YWlf0sjv7Fq9k7Eg11Ov2Yp4MQR1V8kQ5+8I/gsekbF ALQ2ygC1dOSOudm42JWYY6Xlq5RN1oPgcSg751uJP6guhuVZ4TA7KK3nuI8oO8rjQSsJq9DYIP1xU9yW/M4aE56y0j9WX24jVc X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4e48934-a0f5-40ee-22f6-08daba481646 X-MS-Exchange-CrossTenant-AuthSource: BY5PR07MB7029.namprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2022 07:26:41.2651 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB6362 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246595 Archived-At: ------=_Part_2035026_1648988568.1667114794950 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I'm not sure why this warning occurs? Can you not have unused arguments (m= arked as unused) in lexical scope? hierarchy--create-delayed-tree-widget calls=C2=A0widget-convert to create t= ree-widgets but, in the case of delayed children, provides an :expander to = load when the child is called for; the :expander expects a function that ca= n take a single argument: the widget you're making children for.I assume it= 's so your function can figure out what the children should be, depending o= n what the parent widget is. However, Hierarchy already computes the children with the childrenfn a user= can pass in so the parent widget is entirely unnecessary for us; so I mark= ed is as unused by prefacing the variable name with an underscore, as I tho= ught was the convention. Is my understanding mistaken? Does it, say, have to only be an underscore f= or the argument rather than a name which starts=C2=A0with an underscore? I = thought just starting with an underscore sufficed. On Saturday, October = 29, 2022 at 07:46:29 AM CDT, Eli Zaretskii wrote: =20 =20 > From: Arash Esbati > Date: Sat, 29 Oct 2022 13:58:45 +0200 >=20 > building Emacs from master (f826f56a41) issues this warning: >=20 >=C2=A0 In hierarchy--create-delayed-tree-widget: >=C2=A0 emacs-lisp/hierarchy.el:570:12: Warning: Unused lexical argument `w= idget' >=20 > I'm not familiar with the code, but I think this is due to commit > c6ec08e49a and how `hierarchy--create-delayed-tree-widget' is defined. Jonathan, could you please fix this? =20 ------=_Part_2035026_1648988568.1667114794950 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm not sure why = this warning occurs? Can you not have unused arguments (marked as unused) i= n lexical scope?

=
hierarchy--create-delayed-t= ree-widget calls widget-convert to create tree-widgets but, in t= he case of delayed children, provides an :expander to load when the child is= called for; the :expander expects a function that can take a single argumen= t: the widget you're making children for.
I assume it's so your function can figure out what the children should= be, depending on what the parent widget is.

However= , Hierarchy already computes the children with the childrenfn a user = can pass in so the parent widget is entirely unnecessary for us; so I marke= d is as unused by prefacing the variable name with an underscore, as I thou= ght was the convention.

Is my under= standing mistaken? Does it, say, have to only be an underscore for the argu= ment rather than a name which starts with an underscore? I thou= ght just starting with an underscore sufficed.
=20
=20
On Saturday, October 29, 2022 at 07:46:29 AM CDT, Eli Z= aretskii <eliz@gnu.org> wrote:


> From: Arash Esbati <arash@gnu.org&= gt;
> Date: Sat, 29 Oct 2022 13:58:45 +0200
>
> building Emacs= from master (f826f56a41) issues this warning:
&g= t;
>  In hierarchy--create-delayed-tree= -widget:
>  emacs-lisp/hierarchy.el:570:= 12: Warning: Unused lexical argument `widget'
>= ;
> I'm not familiar with the code, but I thi= nk this is due to commit
> c6ec08e49a and how = `hierarchy--create-delayed-tree-widget' is defined.

Jonathan, could you please fix this?
= ------=_Part_2035026_1648988568.1667114794950--