From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Daniel Hackney <dan@haxney.org>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: Lexical byte-compilation warnings cleanup
Date: Wed, 04 Sep 2013 23:30:43 -0400 [thread overview]
Message-ID: <jwvwqmw2cab.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAMqXDZsN994gNDwDLt2JHsY+y5+VFeSO9vKfkNiNwjcWZQyO6w@mail.gmail.com> (Daniel Hackney's message of "Mon, 19 Aug 2013 19:33:00 -0400")
> - I'm seeing a lot of "Argument foo is not a lexical variable", such as
> in vc/ediff-diff.el:532:56. What does this mean and is this something
I've noticed that there's a bug in byte-compile-force-lexical-warnings
which causes extra spurious warnings of this kind, so when using
byte-compile-force-lexical-warnings, double check those warnings (which
have been changed in the mean time to use a different formulation) since
they may just be spurious.
> -(defun dbus-string-to-byte-array (string)
> - "Transforms STRING to list (:array :byte c1 :byte c2 ...).
> -STRING shall be UTF8 coded."
> - (if (zerop (length string))
> +(defun dbus-string-to-byte-array (str)
> + "Transforms STR to list (:array :byte c1 :byte c2 ...).
> +STR shall be UTF8 coded."
> + (if (zerop (length str))
E.g. your renaming of a `string' argument to `str' is probably the
result of such a spurious warning. So I didn't apply this hunk.
> -(defun eww-display-raw (charset)
> +(defun eww-display-raw (_charset)
> (let ((data (buffer-substring (point) (point-max))))
> (eww-setup-buffer)
> (let ((inhibit-read-only t))
When unused function arguments can be removed (as is the case here),
it's generally a better choice than to mark them as unused.
I just installed your patch, thank you, and sorry for the delay,
Stefan
next prev parent reply other threads:[~2013-09-05 3:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 23:33 Lexical byte-compilation warnings cleanup Daniel Hackney
2013-08-20 0:01 ` Juanma Barranquero
2013-08-20 0:11 ` Glenn Morris
2013-08-20 5:47 ` Stefan Monnier
2013-08-20 15:25 ` Drew Adams
2013-08-20 20:41 ` Stefan Monnier
2013-08-20 21:31 ` Drew Adams
2013-08-20 23:21 ` Stefan Monnier
2013-08-21 0:10 ` Drew Adams
2013-08-21 1:53 ` Stephen J. Turnbull
2013-08-21 2:57 ` Drew Adams
2013-08-21 4:49 ` Stefan Monnier
2013-09-04 20:50 ` Daniel Hackney
2013-09-15 19:33 ` Daniel Colascione
2013-08-21 5:19 ` Dmitri Paduchikh
2013-08-21 20:12 ` Stefan Monnier
2013-09-05 3:30 ` Stefan Monnier [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-08-21 23:12 Barry OReilly
2013-08-22 5:05 ` Dmitri Paduchikh
2013-08-22 20:41 ` Stefan Monnier
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=jwvwqmw2cab.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=dan@haxney.org \
--cc=emacs-devel@gnu.org \
/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.