[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b0d190f: Minor improvement in documentation of inte
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master b0d190f: Minor improvement in documentation of internals |
Date: |
Fri, 16 Oct 2015 10:03:10 +0000 |
branch: master
commit b0d190fbe2cd4a092fa186b3d674ec89ff000776
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Minor improvement in documentation of internals
* doc/lispref/internals.texi (Writing Emacs Primitives): Document QUIT.
---
doc/lispref/internals.texi | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index 20681c0..e620da0 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -660,6 +660,7 @@ usage: (or CONDITIONS...) */)
if (!NILP (val))
break;
args = XCDR (args);
+ QUIT;
@}
@end group
@@ -779,6 +780,14 @@ their addresses after performing Lisp evaluation. Lisp
evaluation can
occur via calls to @code{eval_sub} or @code{Feval}, either directly or
indirectly.
address@hidden @code{QUIT}, use in Lisp primitives
+ Note the call to the @code{QUIT} macro inside the loop: this macro
+checks whether the user pressed @kbd{C-g}, and if so, aborts the
+processing. You should do that in any loop that can potentially
+require a large number of iterations; in this case, the list of
+arguments could be very long. This increases Emacs responsiveness and
+improves user experience.
+
You must not use C initializers for static or global variables unless
the variables are never written once Emacs is dumped. These variables
with initializers are allocated in an area of memory that becomes
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master b0d190f: Minor improvement in documentation of internals,
Eli Zaretskii <=