From: Eli Zaretskii <eliz@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: luismbo@gmail.com, 33828@debbugs.gnu.org
Subject: bug#33828: 26.1; Unbound defvar across compilation units
Date: Sat, 22 Dec 2018 09:43:59 +0200 [thread overview]
Message-ID: <83bm5eatvk.fsf@gnu.org> (raw)
In-Reply-To: <87lg4i8ek3.fsf@gmail.com> (message from João Távora on Sat, 22 Dec 2018 02:45:32 +0000)
> From: João Távora <joaotavora@gmail.com>
> Cc: Luís Oliveira <luismbo@gmail.com>,
> 33828@debbugs.gnu.org
> Date: Sat, 22 Dec 2018 02:45:32 +0000
>
> >> (defun f2-foo ()
> >> (let ((my-special 123))
> >> (f2-bar)))
> >>
> >> (defun f2-bar ()
> >> my-special)
> >>
> >> (print (f2-bar))
> >>
> >>
> >>
> >> $ emacs -Q -L . -f batch-byte-compile f2.el
> >>
> >> In toplevel form:
> >> f2.el:5:1:Warning: Unused lexical variable `my-special'
> >
> > That's because you do nothing with the value of f2-bar.
>
> f2-bar is a function, and it is called. Did you mean 'my-special'? It
> is used as well, in f2-bar.
I meant the value returned by f2-bar in f2-foo.
next prev parent reply other threads:[~2018-12-22 7:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-21 12:02 bug#33828: 26.1; Unbound defvar across compilation units Luís Oliveira
2018-12-21 13:50 ` Luís Oliveira
2018-12-21 20:02 ` Eli Zaretskii
2018-12-22 2:45 ` João Távora
2018-12-22 7:43 ` Eli Zaretskii [this message]
2018-12-22 22:40 ` Philipp Stephani
2018-12-23 1:16 ` João Távora
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83bm5eatvk.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=33828@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
--cc=luismbo@gmail.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).