emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lexical binding


From: Stefan Monnier
Subject: Re: Lexical binding
Date: Sat, 02 Apr 2011 14:38:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>> Just a note that the lexbind branch has been merged into trunk,

> An interesting warning:

> ;;; file test.el  -*- lexical-binding: t -*-
> (require 'cl)

> (defun test (&rest args)
>   (loop for x in args))
> ;;; end of file

> => test.el:4:1:Warning: Unused lexical variable `x'

> => test.el:4:1:Warning: variable `_x' not left unused

Indeed, if a variable is only assigned to, it's both "unused lexical
var" and "not left unused".


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]