[Top][All Lists]

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

Re: DocView AutoFitting via "doc-view-autofit-mode"

From: Tassilo Horn
Subject: Re: DocView AutoFitting via "doc-view-autofit-mode"
Date: Tue, 03 Apr 2012 17:18:06 +0200
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.94 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>>> It is already enabled (bzr trunk), I just didn't see it. Strangely
>>>> enough, using `lexical-let' inside a lexical binding enabled file
>>>> produces tons of "bad lexing" errors when used with named functions
>>>> (It doesn't in lexica-binding disabled files).
>>> I don't know what "used with named functions" mean.
>> In the context of what was talked about
>> (lambda () (message "foo"))
>> would be an unnamed function, whereas
>> (defun foo () (message "foo"))
>> would be a function named "foo"
> I know, but that doesn't explain the "used with".
> Obviously, named functions are used all over the place with
> lexical-binding, so they do work in many circumstances.

Moritz meant you get strange error messages when using lexical-let in a
lexical-binding enabled file.  This is a test case:

--8<---------------cut here---------------start------------->8---
;; -*- lexical-binding: t -*-

(defun foo (arg)

(lexical-let ((x 1))
  (foo x))
--8<---------------cut here---------------end--------------->8---

When you eval the last form, you get a message [bad-lexical-ref].  Well,
that's actually not a bad thing, because if the file uses
lexical-binding there's no reason for using lexical-let.  The message is
just not very clear.


reply via email to

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