aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-10-16 13:01:53 +0300
committerEli Zaretskii2015-10-16 13:01:53 +0300
commitb0d190fbe2cd4a092fa186b3d674ec89ff000776 (patch)
tree6caa54d5d35df612de28d85e1a4002d89bd548db
parentd05410f349661768845a8c16a9d473b175d6a1de (diff)
downloademacs-b0d190fbe2cd4a092fa186b3d674ec89ff000776.tar.gz
emacs-b0d190fbe2cd4a092fa186b3d674ec89ff000776.zip
Minor improvement in documentation of internals
* doc/lispref/internals.texi (Writing Emacs Primitives): Document QUIT.
-rw-r--r--doc/lispref/internals.texi9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index 20681c07d9a..e620da0b4ff 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -660,6 +660,7 @@ usage: (or CONDITIONS...) */)
660 if (!NILP (val)) 660 if (!NILP (val))
661 break; 661 break;
662 args = XCDR (args); 662 args = XCDR (args);
663 QUIT;
663 @} 664 @}
664@end group 665@end group
665 666
@@ -779,6 +780,14 @@ their addresses after performing Lisp evaluation. Lisp evaluation can
779occur via calls to @code{eval_sub} or @code{Feval}, either directly or 780occur via calls to @code{eval_sub} or @code{Feval}, either directly or
780indirectly. 781indirectly.
781 782
783@cindex @code{QUIT}, use in Lisp primitives
784 Note the call to the @code{QUIT} macro inside the loop: this macro
785checks whether the user pressed @kbd{C-g}, and if so, aborts the
786processing. You should do that in any loop that can potentially
787require a large number of iterations; in this case, the list of
788arguments could be very long. This increases Emacs responsiveness and
789improves user experience.
790
782 You must not use C initializers for static or global variables unless 791 You must not use C initializers for static or global variables unless
783the variables are never written once Emacs is dumped. These variables 792the variables are never written once Emacs is dumped. These variables
784with initializers are allocated in an area of memory that becomes 793with initializers are allocated in an area of memory that becomes