Subject: Re: bug#23852: 25.0.95; lazy-completion-table discards metadata

From: Noam Postavsky <[email-masked]>
Date: Sun, 26 Jun 2016 22:42:09 -0400

On Sun, Jun 26, 2016 at 10:21 PM, Michael Heerdegen
<[email-masked]> wrote:
> for example:
>
> (completing-read
>  "Input: "
>  (letrec ((table (lazy-completion-table
>                   table (lambda () (let ((cands '("1" "2")))
>                                 (lambda (string pred action)
>                                   (if (eq action 'metadata)
>                                       `(metadata
>                                         (annotation-function . ,(lambda (_) " ---")))
>                                     (complete-with-action
>                                      action cands string pred))))))))
>    table))

When trying to evaluate this, I get an error after hitting TAB at the prompt:

Debugger entered--Lisp error: (void-variable table)
  (functionp table)
  (if (functionp table) (progn (setq table (funcall (function (lambda
nil (let (...) (function ...))))))))
[...]