GNU bug report logs - #22961
The read function does not support a lambda argument

Previous Next

Package: emacs;

Reported by: Mihai Călin Bazon <mihai.bazon <at> gmail.com>

Date: Wed, 9 Mar 2016 16:28:01 UTC

Severity: normal

Done: Andreas Schwab <schwab <at> linux-m68k.org>

Bug is archived. No further changes may be made.

Full log


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

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: 22961 <at> debbugs.gnu.org, mihai.bazon <at> gmail.com
Cc: John Mastro <john.b.mastro <at> gmail.com>,
 Andreas Schwab <schwab <at> linux-m68k.org>
Subject: The read function does not support a lambda argument
Date: Wed, 9 Mar 2016 15:31:07 -0500
[Message part 1 (text/plain, inline)]
I just re-built using this commit (
http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25&id=711ca362e7f8ca7c4f664dc2fe60bc5fa4e4f4fe
).

Now the earlier error went away, but I get

  Symbol’s value as variable is void: prev

I guess the read call should be inside the let:

(let ((str "TEST")
      (pos 0)
      (prev nil))
  (read (lambda (&optional ch)
          (cond
           (ch (push ch prev))
           (prev (pop prev))
           ((< pos (length str))
            (prog1 (aref str pos)
              (setq pos (1+ pos))))))))

Above returns "TEST".
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 78 days ago.

Previous Next


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