diff options
| author | Mattias EngdegÄrd | 2023-10-23 11:12:33 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2023-10-23 14:48:42 +0200 |
| commit | 48e7f5493e4ffd31cb705adf982485c3b30fbbac (patch) | |
| tree | 7bf60280b26b34311bad9bf4366a85adb3d405d1 /src | |
| parent | d1fa9f19566e1ddfa2cb38ccb360a7b3ba540dc3 (diff) | |
| download | emacs-48e7f5493e4ffd31cb705adf982485c3b30fbbac.tar.gz emacs-48e7f5493e4ffd31cb705adf982485c3b30fbbac.zip | |
Improved `eval` documentation
Prompted by Michael Heerdegen.
* src/eval.c (Feval):
* doc/lispref/eval.texi (Eval):
Be more precise about the LEXICAL argument.
Diffstat (limited to 'src')
| -rw-r--r-- | src/eval.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c index 9268b65aa85..f5397e9fb72 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2364,9 +2364,13 @@ static Lisp_Object list_of_t; /* Never-modified constant containing (t). */ | |||
| 2364 | 2364 | ||
| 2365 | DEFUN ("eval", Feval, Seval, 1, 2, 0, | 2365 | DEFUN ("eval", Feval, Seval, 1, 2, 0, |
| 2366 | doc: /* Evaluate FORM and return its value. | 2366 | doc: /* Evaluate FORM and return its value. |
| 2367 | If LEXICAL is t, evaluate using lexical scoping. | 2367 | If LEXICAL is `t', evaluate using lexical binding by default. |
| 2368 | LEXICAL can also be an actual lexical environment, in the form of an | 2368 | This is the recommended value. |
| 2369 | alist mapping symbols to their value. */) | 2369 | |
| 2370 | If absent or `nil', use dynamic scoping only. | ||
| 2371 | |||
| 2372 | LEXICAL can also represent an actual lexical environment; see the Info | ||
| 2373 | node `(elisp)Eval' for details. */) | ||
| 2370 | (Lisp_Object form, Lisp_Object lexical) | 2374 | (Lisp_Object form, Lisp_Object lexical) |
| 2371 | { | 2375 | { |
| 2372 | specpdl_ref count = SPECPDL_INDEX (); | 2376 | specpdl_ref count = SPECPDL_INDEX (); |