emacs-devel
[Top][All Lists]
Advanced

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

Re: problems with flet on last emacs


From: Thierry Volpiatto
Subject: Re: problems with flet on last emacs
Date: Wed, 27 Jun 2012 16:27:12 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Tassilo Horn <address@hidden> writes:

> 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)
>                     (foo))
>     (fset (quote foo) x)))
>
> Two times `x', and those should probably gensyms, anyway...

Here the forms returned by the two different Emacs versions:

--8<---------------cut here---------------start------------->8---
(require 'cl)
(macroexpand '(flet ((foo (a) (+ a 1))) (foo 2)))

;; 24.1
(let* ((--cl-letf-bound-- (fboundp (quote foo)))
       (--cl-letf-save-- (and --cl-letf-bound-- (symbol-function (quote foo)))))
  (unwind-protect
       (progn (fset (quote foo)
                    (function* (lambda (a) (block foo (+ a 1))))) (foo 2))
    (if --cl-letf-bound--
        (fset (quote foo) --cl-letf-save--)
        (fmakunbound (quote foo)))))

;; 24.1.50.1
(let* ((x (cl-function (lambda (a) (cl-block foo (+ a 1)))))
       (x (symbol-function (quote foo))))
  (unwind-protect
       (progn
         (fset (quote foo) x) (foo 2))
    (fset (quote foo) x)))
--8<---------------cut here---------------end--------------->8---

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




reply via email to

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