diff options
author | Nicolas Petton <nicolas@petton.fr> | 2015-10-23 18:06:54 +0200 |
---|---|---|
committer | Nicolas Petton <nicolas@petton.fr> | 2015-10-23 18:06:54 +0200 |
commit | 8b47daab5ce7da394a057f40aa2738b6c204c2f5 (patch) | |
tree | 8ff1ed5f8568e6fab1e6a992893f177115f475c4 /lisp/emacs-lisp | |
parent | 8408f4e38cb4108f8dde971bbc5d5220c66e0f67 (diff) | |
download | emacs-8b47daab5ce7da394a057f40aa2738b6c204c2f5.tar.gz emacs-8b47daab5ce7da394a057f40aa2738b6c204c2f5.tar.bz2 emacs-8b47daab5ce7da394a057f40aa2738b6c204c2f5.zip |
* lisp/emacs-lisp/thunk.el: Better documentation.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/thunk.el | 19 |
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 @@ ;;; Commentary: ;; -;; Thunk provides functions and macros to control the evaluation of -;; forms. Use `thunk-delay' to delay the evaluation of a form, and -;; `thunk-force' to evaluate it. Evaluation is cached, and only -;; happens once. +;; Thunk provides functions and macros to delay the evaluation of +;; forms. +;; +;; Use `thunk-delay' to delay the evaluation of a form, and +;; `thunk-force' to evaluate it. The result of the evaluation is +;; cached, and only happens once. +;; +;; Here is an example of a form which evaluation is delayed: +;; +;; (setq delayed (thunk-delay (message "this message is delayed"))) +;; +;; `delayed' is not evaluated until `thunk-force' is called, like the +;; following: +;; +;; (thunk-force delayed) ;; Tests are located at test/automated/thunk-tests.el |