From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: gmane.emacs.devel Subject: Re: problems with flet on last emacs Date: Wed, 27 Jun 2012 16:42:47 +0200 Organization: Informatimago Message-ID: <87sjdgq0ig.fsf@kuiper.lan.informatimago.com> References: <87pq8lnd7v.fsf@gmail.com> <87ehp099bb.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1340808214 15742 80.91.229.3 (27 Jun 2012 14:43:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2012 14:43:34 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 27 16:43:30 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SjtSq-0008II-Gm for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2012 16:43:28 +0200 Original-Received: from localhost ([::1]:39818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjtSq-0004zo-IY for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2012 10:43:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjtSi-0004zg-Sf for emacs-devel@gnu.org; Wed, 27 Jun 2012 10:43:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SjtSY-0006S2-4G for emacs-devel@gnu.org; Wed, 27 Jun 2012 10:43:20 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:42352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SjtSX-0006RQ-T2 for emacs-devel@gnu.org; Wed, 27 Jun 2012 10:43:10 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SjtSP-0007nk-Hp for emacs-devel@gnu.org; Wed, 27 Jun 2012 16:43:01 +0200 Original-Received: from 81.202.16.46.dyn.user.ono.com ([81.202.16.46]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Jun 2012 16:43:01 +0200 Original-Received: from pjb by 81.202.16.46.dyn.user.ono.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Jun 2012 16:43:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 76 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 81.202.16.46.dyn.user.ono.com Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:OWFjY2VkNzE3MDdmNDE1YWUyMDA1MGI2YmQ3YzNjOTAyN2E5NmE3Yw== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151218 Archived-At: Tassilo Horn writes: > Thierry Volpiatto 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 > persists. > >> 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)) > (foo)) > > > Debugger entered--Lisp error: (void-function foo) > symbol-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) > eval-last-sexp-1(nil) > eval-last-sexp(nil) > call-interactively(eval-last-sexp nil nil) > > The macroexpansion is a bit strange: Yes, it doesn't seem to be guarding for unfbound symbols… > (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... They probably are. Try: (eq 'x (first (first (second (macroexpand '(flet ((foo () 1)) (foo))))))) and try: (let ((expansion (macroexpand '(flet ((foo () 1)) (foo))))) (eq (first (first (second expansion))) (first (second (second expansion))))) -- __Pascal Bourguignon__ http://www.informatimago.com/ A bad day in () is better than a good day in {}.