diff options
| author | Chong Yidong | 2012-02-04 22:56:32 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-02-04 22:56:32 +0800 |
| commit | 735cc5ca6fe9b19aa9f69eb696baef2b8b4bd0fb (patch) | |
| tree | cf9722413f79647d3c302142d8e9cc95bdfa13af /etc | |
| parent | d7f29f8e5c589e4676b2ab53fea7a8b4cfcd4be3 (diff) | |
| download | emacs-735cc5ca6fe9b19aa9f69eb696baef2b8b4bd0fb.tar.gz emacs-735cc5ca6fe9b19aa9f69eb696baef2b8b4bd0fb.zip | |
Update Functions chapter of Lisp manual; document closures.
* doc/emacs/functions.texi (What Is a Function): Add closures. Mention
"return value" terminology. Add xref for command-execute. Remove
unused "keystroke command" terminology.
(Lambda Expressions): Give a different example than in the
following subsection. Add xref to Anonymous Functions.
(Function Documentation): Remove gratuitous markup.
(Function Names): Move introductory text to `What Is a Function'.
(Defining Functions): Fix defun argument spec.
(Anonymous Functions): Document lambda macro explicitly. Mention
effects on lexical binding.
(Function Cells): Downplay direct usage of fset.
(Closures): New node.
(Inline Functions): Remove "open-code" terminology.
(Declaring Functions): Minor tweak; .m is not C code.
* doc/emacs/variables.texi (Variables): Don't refer to "global value".
(Local Variables, Void Variables): Copyedits.
(Lexical Binding): Minor clarification of example.
(File Local Variables): Mention :safe and :risky defcustom args.
(Lexical Binding): Add xref to Closures node.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -1049,19 +1049,20 @@ sc.el, x-menu.el, rnews.el, rnewspost.el | |||
| 1049 | 1049 | ||
| 1050 | * Lisp changes in Emacs 24.1 | 1050 | * Lisp changes in Emacs 24.1 |
| 1051 | 1051 | ||
| 1052 | +++ | ||
| 1052 | ** Code can now use lexical scoping by default instead of dynamic scoping. | 1053 | ** Code can now use lexical scoping by default instead of dynamic scoping. |
| 1053 | The `lexical-binding' variable lets code use lexical scoping for local | 1054 | The `lexical-binding' variable lets code use lexical scoping for local |
| 1054 | variables. It is typically set via a file-local variable in the first | 1055 | variables. It is typically set via a file-local variable in the first |
| 1055 | line of the file, in which case it applies to all the code in that file. | 1056 | line of the file, in which case it applies to all the code in that file. |
| 1056 | 1057 | +++ | |
| 1057 | *** `eval' takes a new optional argument `lexical' to choose the new lexical | 1058 | *** `eval' takes a new optional argument `lexical' to choose the new lexical |
| 1058 | binding instead of the old dynamic binding mode. | 1059 | binding instead of the old dynamic binding mode. |
| 1059 | 1060 | +++ | |
| 1060 | *** Lexically scoped interpreted functions are represented with a new form | 1061 | *** Lexically scoped interpreted functions are represented with a new form |
| 1061 | of function value which looks like (closure ENV ARGS &rest BODY). | 1062 | of function value which looks like (closure ENV ARGS &rest BODY). |
| 1062 | 1063 | ||
| 1063 | *** New macro `letrec' to define recursive local functions. | 1064 | *** New macro `letrec' to define recursive local functions. |
| 1064 | 1065 | +++ | |
| 1065 | *** New function `special-variable-p' to check whether a variable is | 1066 | *** New function `special-variable-p' to check whether a variable is |
| 1066 | declared as dynamically bound. | 1067 | declared as dynamically bound. |
| 1067 | 1068 | ||