diff options
author | Daniel Colascione <dancol@dancol.org> | 2015-03-03 10:56:24 -0800 |
---|---|---|
committer | Daniel Colascione <dancol@dancol.org> | 2015-03-03 10:56:24 -0800 |
commit | cecf4afebb394351a78c48d05e81a1e55af6da32 (patch) | |
tree | 983591013d5ea7c5375546948044b519dff1680d /doc | |
parent | 02eb227e8163c6212e814b5b7e191b4d34306872 (diff) | |
download | emacs-cecf4afebb394351a78c48d05e81a1e55af6da32.tar.gz |
Address generator feedback
* doc/lispref/control.texi (Generators): Correct missing word. Clarify which
forms are legal in which parts of `unwind-protect'. Fix orphaned
close parenthesis.
* lisp/emacs-lisp/generator.el: Make globals conform to elisp
style throughout. Use more efficient font-lock patterns.
(cps-inhibit-atomic-optimization): Rename from
`cps-disable-atomic-optimization'.
(cps--gensym): New macro; replaces `cl-gensym' throughout.
(cps-generate-evaluator): Move the `iter-yield' local macro
definition here
(iter-defun, iter-lambda): from here.
* test/automated/generator-tests.el (cps-test-iter-close-finalizer):
Rename `gc-precise-p' to `gc-precise'.
* test/automated/generator-tests.el (cps-testcase): Use
`cps-inhibit-atomic-optimization' instead of
`cps-disable-atomic-optimization'.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
-rw-r--r-- | doc/lispref/control.texi | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index c27805b3d6e..f96cb26a5e1 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,5 +1,9 @@ 2015-03-03 Daniel Colascione <dancol@dancol.org> + * control.texi (Generators): Correct missing word. Clarify which + forms are legal in which parts of `unwind-protect'. Fix orphaned + close parenthesis. + * objects.texi (Finalizer Type): New section for finalizer objects. (Type Predicates): Mention finalizers in `type-of' documentation. * elisp.texi (Top): Link to finalizer type. diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index bec2bc92ac4..f512ad990bd 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -661,7 +661,7 @@ indicates that the current iterator should pause and return @code{iter-yield-from} yields all the values that @var{iterator} produces and evaluates to the value that @var{iterator}'s generator function returns normally. While it has control, @var{iterator} -receives sent to the iterator using @code{iter-next}. +receives values sent to the iterator using @code{iter-next}. @end defmac To use a generator function, first call it normally, producing a @@ -693,9 +693,11 @@ evaluating any @code{iter-yield} form. @end defun @defun iter-close iterator -If @var{iterator} is suspended inside a @code{unwind-protect} and -becomes unreachable, Emacs will eventually run unwind handlers after a -garbage collection pass. To ensure that these handlers are run before +If @var{iterator} is suspended inside an @code{unwind-protect}'s +@code{bodyform} and becomes unreachable, Emacs will eventually run +unwind handlers after a garbage collection pass. (Note that +@code{iter-yield} is illegal inside an @code{unwind-protect}'s +@code{unwindforms}.) To ensure that these handlers are run before then, use @code{iter-close}. @end defun @@ -716,8 +718,8 @@ working with iterators. @example (iter-defun my-iter (x) (iter-yield (1+ (iter-yield (1+ x)))) - -1 ;; Return normally - ) + ;; Return normally + -1) (let* ((iter (my-iter 5)) (iter2 (my-iter 0))) |