GNU bug report logs - #58864
29.0.50; Warning when compiling emacs-lisp/hierarchy.el

Previous Next

Package: emacs;

Reported by: Arash Esbati <arash <at> gnu.org>

Date: Sat, 29 Oct 2022 12:00:01 UTC

Severity: normal

Tags: fixed

Found in version 29.0.50

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 58864 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jaft <jaft.r <at> outlook.com>
Cc: 58864 <at> debbugs.gnu.org, arash <at> gnu.org
Subject: Re: bug#58864: 29.0.50; Warning when compiling emacs-lisp/hierarchy.el
Date: Sun, 30 Oct 2022 10:05:14 +0200
> Date: Sun, 30 Oct 2022 07:26:34 +0000 (UTC)
> From: Jaft <jaft.r <at> outlook.com>
> Cc: "58864 <at> debbugs.gnu.org" <58864 <at> debbugs.gnu.org>
> 
> I'm not sure why this warning occurs? Can you not have unused arguments (marked as unused) in lexical
> scope?

You can, but the argument should indeed be marked as unused, by
prepending the '_' to its name.  Basil already did that, so the
problem is now solved.

> hierarchy--create-delayed-tree-widget calls widget-convert to create tree-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 can
> 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 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 marked is as unused by prefacing the variable name with an underscore,
> as I thought was the convention.

This explanation should be best put in a comment to that function, I
think.




This bug report was last modified 2 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.