[Top][All Lists]
[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
- problems with flet on last emacs, Thierry Volpiatto, 2012/06/27
- Re: problems with flet on last emacs, Pascal J. Bourguignon, 2012/06/27
- Re: problems with flet on last emacs, Stefan Monnier, 2012/06/27
- Re: problems with flet on last emacs, Thierry Volpiatto, 2012/06/27
- Re: problems with flet on last emacs, Ivan Kanis, 2012/06/28
- Re: problems with flet on last emacs, Thierry Volpiatto, 2012/06/28
- Re: problems with flet on last emacs, Ivan Kanis, 2012/06/29
- Re: problems with flet on last emacs, Thierry Volpiatto, 2012/06/29
Re: problems with flet on last emacs, Tassilo Horn, 2012/06/27
Re: problems with flet on last emacs, Andreas Schwab, 2012/06/27
Re: problems with flet on last emacs, Glenn Morris, 2012/06/27