[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs documentation is bad
From: |
Barry Fishman |
Subject: |
Re: Emacs documentation is bad |
Date: |
Sun, 09 Sep 2018 17:33:53 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
On 2018-09-09 07:26:37 -07, John Stone wrote:
> From <tomas@tuxteam.de>
>> I'd try to help you, but the way you are yelling around, I don't really
>> feel like it.
[I'll assume the OP is just frustrated, and is used to Twitter, so
doesn't know how to behave in polite company.]
I have a hard time parsing your odd formatting. I assume your expression is:
(((lambda (f) (lambda (x) (list f x))) 'g) 'y)
This does not work with 'lisp'. It only works with Scheme
implementations, where the first position in a S-expression is
evaluated. Scheme, although it shares the syntax with Lisp languages,
has quite different semantics, so it is not useful to consider it
another Lisp. To me it's like referring to Java as a C++.
In most lisps (like Common Lisp and E-Lisp) that is not done, so your
lambda expression which evaluates to a lambda will not then be
re-evaluated. In most lisps you can use a lambda expression in the function
position of an S-expression, but not something that evaluates to a
lambda.
You can can force the evaluation with:
(funcall ((lambda (f) (lambda (x) (list f x))) 'g) 'y)
Which works with Common Lisp, but not E-Lisp, since E-Lisp does not have
lexical scope by default. But you can enable it so that it would work:
(setq lexical-binding t)
(funcall ((lambda (f) (lambda (x) (list f x))) 'g) 'y)
--> (g y)
If Scheme semantics are that important to you, you could move your project to
a Scheme environment, maybe MIT Scheme and Erwin, if you want a Scheme
based Emacs. Or help with the project implementing Guile Emacs.
> don't fix the broken the docs then, we'll use a different lisp for this
> project
As far as the Gnu Emacs documentation is concerned I'm not convinced it is
wrong.
--
Barry Fishman
Message not available