aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Petton2015-10-23 18:06:54 +0200
committerNicolas Petton2015-10-23 18:06:54 +0200
commit8b47daab5ce7da394a057f40aa2738b6c204c2f5 (patch)
tree8ff1ed5f8568e6fab1e6a992893f177115f475c4
parent8408f4e38cb4108f8dde971bbc5d5220c66e0f67 (diff)
downloademacs-8b47daab5ce7da394a057f40aa2738b6c204c2f5.tar.gz
emacs-8b47daab5ce7da394a057f40aa2738b6c204c2f5.zip
* lisp/emacs-lisp/thunk.el: Better documentation.
-rw-r--r--lisp/emacs-lisp/thunk.el19
1 files changed, 15 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/thunk.el b/lisp/emacs-lisp/thunk.el
index ab366d295f5..d07b25736aa 100644
--- a/lisp/emacs-lisp/thunk.el
+++ b/lisp/emacs-lisp/thunk.el
@@ -26,10 +26,21 @@
26 26
27;;; Commentary: 27;;; Commentary:
28;; 28;;
29;; Thunk provides functions and macros to control the evaluation of 29;; Thunk provides functions and macros to delay the evaluation of
30;; forms. Use `thunk-delay' to delay the evaluation of a form, and 30;; forms.
31;; `thunk-force' to evaluate it. Evaluation is cached, and only 31;;
32;; happens once. 32;; Use `thunk-delay' to delay the evaluation of a form, and
33;; `thunk-force' to evaluate it. The result of the evaluation is
34;; cached, and only happens once.
35;;
36;; Here is an example of a form which evaluation is delayed:
37;;
38;; (setq delayed (thunk-delay (message "this message is delayed")))
39;;
40;; `delayed' is not evaluated until `thunk-force' is called, like the
41;; following:
42;;
43;; (thunk-force delayed)
33 44
34;; Tests are located at test/automated/thunk-tests.el 45;; Tests are located at test/automated/thunk-tests.el
35 46