GNU bug report logs - #33828
26.1; Unbound defvar across compilation units

Previous Next

Package: emacs;

Reported by: Luís Oliveira <luismbo <at> gmail.com>

Date: Fri, 21 Dec 2018 16:23:02 UTC

Severity: minor

Tags: notabug

Found in version 26.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: luismbo <at> gmail.com, 33828 <at> debbugs.gnu.org
Subject: Re: bug#33828: 26.1; Unbound defvar across compilation units
Date: Sat, 22 Dec 2018 09:43:59 +0200
> From: João Távora <joaotavora <at> gmail.com>
> Cc: Luís Oliveira <luismbo <at> gmail.com>,
>   33828 <at> 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.




This bug report was last modified 6 years and 152 days ago.

Previous Next


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