From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Moritz Maxeiner Newsgroups: gmane.emacs.devel Subject: Re: DocView AutoFitting via "doc-view-autofit-mode" Date: Tue, 03 Apr 2012 17:11:08 +0200 Message-ID: <4F7B130C.5040405@googlemail.com> References: <4F764EBB.5030102@googlemail.com> <87sjgnbxth.fsf@thinkpad.tsdh.de> <4F79E8D5.8080701@googlemail.com> <4F7AFD5D.3030809@googlemail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1333465897 10511 80.91.229.3 (3 Apr 2012 15:11:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2012 15:11:37 +0000 (UTC) Cc: Tassilo Horn , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 03 17:11:34 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 1SF5ON-0006DH-MT for ged-emacs-devel@m.gmane.org; Tue, 03 Apr 2012 17:11:31 +0200 Original-Received: from localhost ([::1]:52139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF5OM-0003A4-Qs for ged-emacs-devel@m.gmane.org; Tue, 03 Apr 2012 11:11:30 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF5OE-00039o-Va for emacs-devel@gnu.org; Tue, 03 Apr 2012 11:11:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SF5O8-0004B8-MQ for emacs-devel@gnu.org; Tue, 03 Apr 2012 11:11:22 -0400 Original-Received: from mail-ee0-f41.google.com ([74.125.83.41]:47291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF5O8-0004Ar-CN for emacs-devel@gnu.org; Tue, 03 Apr 2012 11:11:16 -0400 Original-Received: by eeke53 with SMTP id e53so1258278eek.0 for ; Tue, 03 Apr 2012 08:11:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=7d1L8OBAm1heze7SmlcbAbzvSE5oTJlVtlkTuX30Vvk=; b=vsrrlnlVz2CppYg63e/snFbClrFPMqfk1TwlLEzu2CViGW/WuA2lVuLKibsZezZaKm 9p57GtGIKzWujZxr2LVWFwb03Fx48FT336y41ChBN+TjaeeRXXqo72Cr+0NhAT/wNdW/ 2FYJRwTTOineH16KUNqYyAwX9Kl3qnUx5Pg//FVO/JBdTsgPtYtQTq9sSx4FpJjSQX/B dyQbFn+optUifrAShd5/+smThwO9WUzaMMCLvGp49uf8qPC11b/mX8MSnavA4lXuIuiZ D7kMLQAE9BZWoh/dSp/PfCxCcNAcO9XqXYM+Rii7ELUGvRGp9Khxvpdg8KAPx5kqu21B MgpA== Original-Received: by 10.205.122.2 with SMTP id ge2mr5631015bkc.113.1333465874165; Tue, 03 Apr 2012 08:11:14 -0700 (PDT) Original-Received: from [192.168.2.118] (p4FC979AA.dip.t-dialin.net. [79.201.121.170]) by mx.google.com with ESMTPS id z17sm46606395bkw.12.2012.04.03.08.11.12 (version=SSLv3 cipher=OTHER); Tue, 03 Apr 2012 08:11:13 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.83.41 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:149336 Archived-At: Hm, I seem to have expressed myself a bit poorly, so let me clear it up: > Obviously, named functions are used all over the place with > lexical-binding, so they do work in many circumstances. I know that and what I wrote was not meant to contradict it, because you write about general, I wrote about inside lexical-binding enabled files where lexical-let and let should be the same (since lexical binding is already enabled). > using > `lexical-let' inside a lexical binding enabled file produces tons of > "bad lexing" > errors when used with named functions To clarify, I wrote nothing about `lexical-let' in general, I wrote that using it inside a lexical binding enabled file (meaning with the "lexical-binding: t" header) together with a named function would produce errors. You can try it out for yourself with the code I send in the same mail you refer to: > ;;; foo.el --- Foo -*- lexical-binding: t -*- > > (defun foo (window) > (message "%s" window)) > > (defun bar () > (interactive) > (lexical-let ((foobar (selected-window))) > (foo foobar))) Switch to an empty buffer, paste it and then do `M-x eval-buffer' `M-x bar' and you'll get a [bad-lexical-ref] error. Remove the header ( the ;;; foo.el line), do `M-x eval-buffer' `M-x bar' again and you won't get an error, but a message with the selected window. If you use a lambda inside the defun of bar instead of foo, it will work with and without lexical-binding enabled. And this difference is what I simply don't understand. Now, since I had no idea why the function `lexical-let' would behave differently (if it didn't there should be either an error with AND without the header, or both should work fine), could not find any clues in info/manual/docstring and more, why it doesn't work, I wrote that. Moritz