[Top][All Lists]

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

Re: problems with flet on last emacs

From: Tassilo Horn
Subject: Re: problems with flet on last emacs
Date: Wed, 27 Jun 2012 15:24:40 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (gnu/linux)

Thierry Volpiatto <address@hidden> writes:

> All functions that use flet don't work anymore.
> The anonymous function defined by the flet is not read.
> (i.e void function foo)

Oh, yes, that occured to me too.

> I could make it working by restarting my computer, recompiling
> some libraries, (helm, slime) and it worked.

Not for me.  I've tried to rebuild every elisp package, but the error

> When I recompile files, restart Emacs, the problem occur again.
> I have not this problem on 24.1.

Ditto, currently I'm running the released version without problems.

> Any ideas?
> If not I will send a bug report.

Please do so.  Here's a recipe:

  1. emacs -Q
  2. goto *scratch*
  3. eval

     (require 'cl)
     (flet ((foo () 1))

Debugger entered--Lisp error: (void-function foo)
  (let* ((x (cl-function (lambda nil (cl-block foo 1)))) (x (symbol-function 
(quote foo)))) (unwind-protect (progn (fset (quote foo) x) (foo)) (fset (quote 
foo) x)))
  (letf* (((symbol-function (quote foo)) (cl-function (lambda nil (cl-block foo 
1))))) (foo))
  (flet ((foo nil 1)) (foo))
  eval((flet ((foo nil 1)) (foo)) nil)
  call-interactively(eval-last-sexp nil nil)

The macroexpansion is a bit strange:

(let* ((x (cl-function (lambda nil (cl-block foo 1))))
       (x (symbol-function (quote foo))))
  (unwind-protect (progn
                    (fset (quote foo) x)
    (fset (quote foo) x)))

Two times `x', and those should probably gensyms, anyway...


reply via email to

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