From: ben rudgers <ben.rudgers@gmail.com>
To: emacs-devel@gnu.org
Subject: Suggested additional example to Emacs Lisp Manual: Variables: Let
Date: Tue, 17 Jan 2017 14:17:49 -0600 [thread overview]
Message-ID: <CAKmb-ygZK=9phsyzvnd2GrMO4jppyCSyNdSSPM_q9RY_0aeiag@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1205 bytes --]
I apologize for not entirely following the patch submission process. I'm
not sure I understand it fully yet.
The manual does not provide an example showing a locally scoped function.
Though the behavior can potentially be inferred from the documentation of
functions, an example showing the relationship between =let= and =funcall=
might be of practical help for someone who has not made a deep dive into
the manual.
I have appended the following to the documentation for =let= in the
attached file:
Functions defined within a @code{let} must be invoked using a call to
@code{funcall}.
@example
(defun foo (x)
(let ((bar (lambda (y) (+ x y))))
(funcall bar 3)))
(foo 4)
@result{} 7
@end example
The standard internet search engines do not provide a well articulated
example at this time. Because locally scoped functions are a common idiom
in the Lisp family of languages, it seems likely that an example will be
helpful to programmers with experience in other Lisps. =let= seems like the
best place to put an example in the documentation.
Anyway, thanks for all you have done. If you have any questions or there is
anything I can do to help improve the documentation please let me know.
[-- Attachment #1.2: Type: text/html, Size: 1862 bytes --]
[-- Attachment #2: variables.texi --]
[-- Type: application/x-texinfo, Size: 93487 bytes --]
next reply other threads:[~2017-01-17 20:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 20:17 ben rudgers [this message]
2017-01-29 19:20 ` Suggested additional example to Emacs Lisp Manual: Variables: Let John Wiegley
2017-01-30 4:53 ` ben rudgers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKmb-ygZK=9phsyzvnd2GrMO4jppyCSyNdSSPM_q9RY_0aeiag@mail.gmail.com' \
--to=ben.rudgers@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.