From 735cc5ca6fe9b19aa9f69eb696baef2b8b4bd0fb Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 4 Feb 2012 22:56:32 +0800 Subject: 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. --- etc/NEWS | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'etc/NEWS') diff --git a/etc/NEWS b/etc/NEWS index 6dc0756e88..0a401eb3a3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1049,19 +1049,20 @@ sc.el, x-menu.el, rnews.el, rnewspost.el * Lisp changes in Emacs 24.1 ++++ ** Code can now use lexical scoping by default instead of dynamic scoping. The `lexical-binding' variable lets code use lexical scoping for local variables. It is typically set via a file-local variable in the first line of the file, in which case it applies to all the code in that file. - ++++ *** `eval' takes a new optional argument `lexical' to choose the new lexical binding instead of the old dynamic binding mode. - ++++ *** Lexically scoped interpreted functions are represented with a new form of function value which looks like (closure ENV ARGS &rest BODY). *** New macro `letrec' to define recursive local functions. - ++++ *** New function `special-variable-p' to check whether a variable is declared as dynamically bound. -- cgit v1.2.3