all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jaft <jaft.r@outlook.com>
Cc: 58864@debbugs.gnu.org, arash@gnu.org
Subject: bug#58864: 29.0.50; Warning when compiling emacs-lisp/hierarchy.el
Date: Sun, 30 Oct 2022 10:05:14 +0200	[thread overview]
Message-ID: <83wn8hg2it.fsf@gnu.org> (raw)
In-Reply-To: <BY5PR07MB70292258E40A3D29AFC85FAC99349@BY5PR07MB7029.namprd07.prod.outlook.com> (message from Jaft on Sun, 30 Oct 2022 07:26:34 +0000 (UTC))

> Date: Sun, 30 Oct 2022 07:26:34 +0000 (UTC)
> From: Jaft <jaft.r@outlook.com>
> Cc: "58864@debbugs.gnu.org" <58864@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.





  reply	other threads:[~2022-10-30  8:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29 11:58 bug#58864: 29.0.50; Warning when compiling emacs-lisp/hierarchy.el Arash Esbati
2022-10-29 12:45 ` Eli Zaretskii
2022-10-30  7:26   ` Jaft
2022-10-30  8:05     ` Eli Zaretskii [this message]
2022-10-30 11:42       ` Arash Esbati

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wn8hg2it.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=58864@debbugs.gnu.org \
    --cc=arash@gnu.org \
    --cc=jaft.r@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.