emacs-devel
[Top][All Lists]
Advanced

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

Error: add-to-list cannot use lexical var ...


From: Jambunathan K
Subject: Error: add-to-list cannot use lexical var ...
Date: Tue, 14 Aug 2012 10:54:25 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

I happened to make some modifications to vc-dir.el recently and tried
using `add-to-list' as part of these modifications.

Add the below snippet somewhere in vc-dir.el and byte-compile it.
    (let (l)
      (add-to-list 'l "testing"))

You will see an error like.
    vc-dir.el:54:1:Warning: Unused lexical variable `l'
    vc-dir.el:54:7:Error: add-to-list cannot use lexical var `l'

I should say the results are not along the expected lines.  Can someone
explain it to me?
-- 



reply via email to

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