Subject: Re: 24.3; Incorrect "Unused lexical variable" warning with avl-tree-create

From: Christopher Wellons <[email-masked]>
Date: Tue, 10 Sep 2013 14:40:32 -0400

Sorry, I accidentally hit send early. If the above is compiled,

    $ emacs -Q -batch -f batch-byte-compile tmp.el
    In toplevel form:
    tmp.el:3:1:Warning: Unused lexical variable `cmpfun'
    Wrote /tmp/tmp.elc

Due to improper macro expansion of avl-tree-create by defstruct,

    (let
        ((cmpfun #'string<))
      (progn
        (vector 'cl-struct-avl-tree-
                (progn
                  (vector nil nil nil 0))
                #'string<)))