[Top][All Lists]

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

Suggested additional example to Emacs Lisp Manual: Variables: Let

From: ben rudgers
Subject: Suggested additional example to Emacs Lisp Manual: Variables: Let
Date: Tue, 17 Jan 2017 14:17:49 -0600

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 ="" in the attached file:

Functions defined within a @code{let} must be invoked using a call to @code{funcall}.

(defun foo (x)
  (let ((bar (lambda (y) (+ x y))))
    (funcall bar 3)))
(foo 4)
    address@hidden 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: variables.texi
Description: TeXInfo document

reply via email to

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