[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] nsm 01/02: Export running_asynch_code to Lisp
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] nsm 01/02: Export running_asynch_code to Lisp |
Date: |
Tue, 18 Nov 2014 19:24:37 +0000 |
branch: nsm
commit 75ccb64a946a6668288aee50508888be392a0e7f
Author: Lars Magne Ingebrigtsen <address@hidden>
Date: Tue Nov 18 20:23:24 2014 +0100
Export running_asynch_code to Lisp
* lisp.h: Remove "extern bool running_asynch_code".
* emacs.c (syms_of_emacs): Export running_asynch_code to Lisp so
that functions can tell what context they are being run under.
---
src/ChangeLog | 5 +++++
src/emacs.c | 10 ++++++----
src/lisp.h | 2 --
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index d1e082a..484383b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2014-11-18 Lars Magne Ingebrigtsen <address@hidden>
+ * emacs.c (syms_of_emacs): Export running_asynch_code to Lisp so
+ that functions can tell what context they are being run under.
+
+ * lisp.h: Remove "extern bool running_asynch_code".
+
* gnutls.c (gnutls_certificate_details): New function.
(gnutls_hex_string): New utility function.
diff --git a/src/emacs.c b/src/emacs.c
index 4c3857e..17102cb 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -151,10 +151,6 @@ static Lisp_Object Qkill_emacs_hook;
but instead should use the virtual terminal under which it was started. */
bool inhibit_window_system;
-/* If true, a filter or a sentinel is running. Tested to save the match
- data on the first attempt to change it inside asynchronous code. */
-bool running_asynch_code;
-
#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
/* If true, -d was specified, meaning we're using some window system. */
bool display_arg;
@@ -2455,6 +2451,12 @@ Emacs is running. */);
DEFVAR_BOOL ("noninteractive", noninteractive1,
doc: /* Non-nil means Emacs is running without interactive
terminal. */);
+ /* If true, a filter or a sentinel is running. Tested to save the match
+ data on the first attempt to change it inside asynchronous code. */
+ DEFVAR_BOOL ("running-asynch-code", running_asynch_code,
+ doc: /* Non-nil means that asynchronous code is running.
+This could be a process filter, a sentinel or the like. */);
+
DEFVAR_LISP ("kill-emacs-hook", Vkill_emacs_hook,
doc: /* Hook run when `kill-emacs' is called.
Since `kill-emacs' may be invoked when the terminal is disconnected (or
diff --git a/src/lisp.h b/src/lisp.h
index 0bcc0ec..58ebcbc 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4180,8 +4180,6 @@ extern bool fatal_error_in_progress;
/* True means don't do use window-system-specific display code. */
extern bool inhibit_window_system;
-/* True means that a filter or a sentinel is running. */
-extern bool running_asynch_code;
/* Defined in process.c. */
extern Lisp_Object QCtype, Qlocal;