annotate src/blockinput.h @ 96975:60149c696033

2008-07-24 Carsten Dominik <dominik@science.uva.nl> * org-exp.el (org-export-region-as-html, org-export-as-html): Make sure that calls from `org-export-region-as-html' do not do the special check for a subtree. * org-agenda.el (org-batch-store-agenda-views): Fix parsing bug. * org.el (org-open-file): Use `org-open-directory-means-index-dot-org'. (org-open-directory-means-index-dot-org): New option. * org.el (org-make-link-string): Remove link attributes from description. (org-open-at-point): Remove link attributes bevore using the path. * org-exp.el (org-export-as-html): Handle link attributes. * org.el (org-extract-attributes, org-attributes-to-string): New functions. * org-table.el (org-table-to-lisp): New function. * org.el (org-narrow-to-subtree): Do not include the final newline into the narrowed region. * org-agenda.el (org-agenda-custom-commands-local-options): Fixed bug with user-define skipping condition. * org-agenda.el (org-agenda-get-restriction-and-command): Fixed typo. * org-exp.el (org-export-html-style-default): Automatic overflow handling for pre fields. (org-export-as-ascii, org-export-as-html): Change default format for time stamp. * org-table.el (org-table-export): Offer completion for translator functions, and do not require a heading above the table. * org.el (org-renumber-ordered-list, org-beginning-of-item-list): Cater for the case of a list starting in the first line of the buffer. * org-publish.el (org-publish-find-title): Bug fix. (org-publish-org-index): Implement new :index-style option. * org-publish.el (org-publish-timestamp-filename): Use SHA1-encoded file names in the timestamp directory. * org-publish.el (org-publish-needed-p): Be verbose about files published and files skipped. * org-exp.el (org-export-preprocess-string): Swap link normalization and inernal link targeting. * org-publish.el (org-publish-needed-p): Create timestamp directory when it does not exist. * org-clock.el (org-clock-out-when-done): Doc fix. * org.el (org-agenda-skip-unavailable-files): Doc fix. * org-exp.el (org-export-remove-comment-blocks-and-subtrees): Ignore case when searching for the COMMENT cookie at export time. * org-exp.el (org-get-file-contents) (org-get-and-remove-property): New functions. (org-export-handle-include-files): Handle the new prefix options. (org-export-as-html): Fix the verse environment. * org.el (org-time=, org-time<, org-time<=, org-time>) (org-time>=, org-time<>, org-2ft): New functions. (org-op-to-function): Also provide for the time testing fucntions. * org-exp.el (org-export-html-style-default): New constant. * org-exp.el (org-export-html-style-extra): New variable. (org-export-splice-style): New function. * org-exp.el (org-export-plist-vars, org-export-as-html): Implement `org-export-creator-info'. (org-export-creator-info): New option. * org.el (org-clock-drawer-start-re, org-clock-drawer-end-re) (org-property-drawer-re, org-clock-drawer-re): New constants. * org-exp.el (org-icalendar-use-deadline) (org-icalendar-use-scheduled): New options. (org-icalendar-include-todo): Default changed to t. (org-print-icalendar-entries): Implement better utilization of scheduling and deadline time stamps. (org-export-target-internal-links, org-export-as-html): Allow file lines without the "file:" prefix if the file path is an absolute path or starts with ".". * org-clock.el (org-clocktable-shift): Also undertand yesterday, lastweek etc. (org-clock-special-range): Also undertand yesterday, lastweek etc. * org.el (org-agenda-skip-archived-trees): Docstring now discourages using this. (org-scan-tags): Check for org-agenda-archives-mode. (org-map-entries): Make sure org-agenda-archives-mode is nil. (org-agenda-files): Functionality of second arg changed. * org-agenda.el (org-agenda-archives-mode): New variable (org-write-agenda, org-prepare-agenda, org-agenda-list) (org-search-view, org-todo-list, org-tags-view) (org-agenda-list-stuck-projects): Call `org-agenda-files' with `ifmode' argument. (org-agenda-quit): Reset the archives mode. (org-agenda-archives-mode): New command. (org-agenda-set-mode-name): Include archives info. * org.el (org-paste-subtree): Make sure the yanked headline is visible if it was yanked at a visible point. (org-move-item-up): Fix the bug with moving white space at the end of the item. (org-show-empty-lines-in-parent): New function.
author Carsten Dominik <dominik@science.uva.nl>
date Thu, 24 Jul 2008 13:59:56 +0000
parents d45acf0c8d23
children e038c1a8307c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2439
b6c62e4abf59 Put interrupt input blocking in a separate file from xterm.h.
Jim Blandy <jimb@redhat.com>
parents: 2437
diff changeset
1 /* blockinput.h - interface to blocking complicated interrupt-driven input.
75227
e90d04cd455a Update copyright for years from Emacs 21 to present (mainly adding
Glenn Morris <rgm@gnu.org>
parents: 68651
diff changeset
2 Copyright (C) 1989, 1993, 2001, 2002, 2003, 2004,
79759
fc2bcd2a8aad Add 2008 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 78260
diff changeset
3 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
2437
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5 This file is part of GNU Emacs.
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6
94994
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79759
diff changeset
7 GNU Emacs is free software: you can redistribute it and/or modify
2437
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
94994
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79759
diff changeset
9 the Free Software Foundation, either version 3 of the License, or
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79759
diff changeset
10 (at your option) any later version.
2437
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 GNU Emacs is distributed in the hope that it will be useful,
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15 GNU General Public License for more details.
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
94994
29adfc9354e7 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 79759
diff changeset
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
2437
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19
29926
5a1dca465b50 Protect against multiple inclusion. Include
Dave Love <fx@gnu.org>
parents: 27426
diff changeset
20 #ifndef EMACS_BLOCKINPUT_H
5a1dca465b50 Protect against multiple inclusion. Include
Dave Love <fx@gnu.org>
parents: 27426
diff changeset
21 #define EMACS_BLOCKINPUT_H
5a1dca465b50 Protect against multiple inclusion. Include
Dave Love <fx@gnu.org>
parents: 27426
diff changeset
22
5a1dca465b50 Protect against multiple inclusion. Include
Dave Love <fx@gnu.org>
parents: 27426
diff changeset
23 #include "atimer.h"
2437
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 /* When Emacs is using signal-driven input, the processing of those
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 input signals can get pretty hairy. For example, when Emacs is
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27 running under X windows, handling an input signal can entail
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 retrieving events from the X event queue, or making other X calls.
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 If an input signal occurs while Emacs is in the midst of some
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 non-reentrant code, and the signal processing invokes that same
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32 code, we lose. For example, malloc and the Xlib functions aren't
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 usually re-entrant, and both are used by the X input signal handler
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 - if we try to process an input signal in the midst of executing
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 any of these functions, we'll lose.
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37 To avoid this, we make the following requirements:
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 * Everyone must evaluate BLOCK_INPUT before entering these functions,
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 and then call UNBLOCK_INPUT after performing them. Calls
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 BLOCK_INPUT and UNBLOCK_INPUT may be nested.
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 * Any complicated interrupt handling code should test
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 29926
diff changeset
44 interrupt_input_blocked, and put off its work until later.
2437
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 * If the interrupt handling code wishes, it may set
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 interrupt_input_pending to a non-zero value. If that flag is set
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 when input becomes unblocked, UNBLOCK_INPUT will send a new SIGIO. */
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49
75407
205d5c1af245 (interrupt_input_blocked): Declare volatile.
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 75227
diff changeset
50 extern volatile int interrupt_input_blocked;
2437
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 /* Nonzero means an input interrupt has arrived
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 during the current critical section. */
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54 extern int interrupt_input_pending;
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55
27426
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
56
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
57 /* Non-zero means asynchronous timers should be run when input is
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
58 unblocked. */
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
59
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
60 extern int pending_atimers;
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
61
96675
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
62 #if defined HAVE_NS && !defined COCOA_EXPERIMENTAL_CTRL_G
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
63 /* NS does not use interrupt-driven input processing (yet), so this is
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
64 unneeded and moreover was causing problems. */
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
65 #define BLOCK_INPUT
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
66 #define UNBLOCK_INPUT
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
67 #define TOTALLY_UNBLOCK_INPUT
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
68 #define UNBLOCK_INPUT_TO(LEVEL)
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
69
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
70 #else
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
71
2437
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72 /* Begin critical section. */
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
73 #define BLOCK_INPUT (interrupt_input_blocked++)
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74
2721
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
75 /* End critical section.
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
76
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
77 If doing signal-driven input, and a signal came in when input was
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
78 blocked, reinvoke the signal handler now to deal with it.
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
79
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
80 We used to have two possible definitions of this macro - one for
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
81 when SIGIO was #defined, and one for when it wasn't; when SIGIO
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
82 wasn't #defined, we wouldn't bother to check if we should re-invoke
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
83 the signal handler. But that doesn't work very well; some of the
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
84 files which use this macro don't #include the right files to get
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
85 SIGIO.
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
86
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
87 So, we always test interrupt_input_pending now; that's not too
ca5cb6cafc40 * blockinput.h (UNBLOCK_INPUT): We cannot assume that SIGIO is
Jim Blandy <jimb@redhat.com>
parents: 2479
diff changeset
88 expensive, and it'll never get set if we don't need to resignal. */
27426
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
89
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
90 #define UNBLOCK_INPUT \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
91 do \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
92 { \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
93 --interrupt_input_blocked; \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
94 if (interrupt_input_blocked == 0) \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
95 { \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
96 if (interrupt_input_pending) \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
97 reinvoke_input_signal (); \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
98 if (pending_atimers) \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
99 do_pending_atimers (); \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
100 } \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
101 else if (interrupt_input_blocked < 0) \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
102 abort (); \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
103 } \
e28edb0e4233 (pending_atimers): Add extern declaration.
Gerd Moellmann <gerd@gnu.org>
parents: 21796
diff changeset
104 while (0)
2437
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
105
60416
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
106 /* Undo any number of BLOCK_INPUT calls,
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
107 and also reinvoke any pending signal. */
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
108
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
109 #define TOTALLY_UNBLOCK_INPUT \
60481
335c6a2f0c12 (TOTALLY_UNBLOCK_INPUT): Avoid dangling else.
Kim F. Storm <storm@cua.dk>
parents: 60474
diff changeset
110 do if (interrupt_input_blocked != 0) \
60416
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
111 { \
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
112 interrupt_input_blocked = 1; \
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
113 UNBLOCK_INPUT; \
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
114 } \
60481
335c6a2f0c12 (TOTALLY_UNBLOCK_INPUT): Avoid dangling else.
Kim F. Storm <storm@cua.dk>
parents: 60474
diff changeset
115 while (0)
60416
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
116
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
117 /* Undo any number of BLOCK_INPUT calls down to level LEVEL,
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
118 and also (if the level is now 0) reinvoke any pending signal. */
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
119
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
120 #define UNBLOCK_INPUT_TO(LEVEL) \
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
121 do \
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
122 { \
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
123 interrupt_input_blocked = (LEVEL) + 1; \
60474
3bb3556e7af0 (UNBLOCK_INPUT_TO): Always call UNBLOCK_INPUT.
Andreas Schwab <schwab@suse.de>
parents: 60416
diff changeset
124 UNBLOCK_INPUT; \
60416
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
125 } \
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
126 while (0)
306f7ce8d80d (UNBLOCK_INPUT_TO): New macro.
Richard M. Stallman <rms@gnu.org>
parents: 56135
diff changeset
127
96675
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
128 #endif /* defined HAVE_NS && !defined COCOA_EXPERIMENTAL_CTRL_G */
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94994
diff changeset
129
2437
290a7be0d392 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130 #define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT
21515
fb4c986db0e2 Add more prototypes.
Andreas Schwab <schwab@suse.de>
parents: 14186
diff changeset
131
55658
0e26a0be1ee5 (INPUT_BLOCKED_P): New macro.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
132 /* In critical section ? */
0e26a0be1ee5 (INPUT_BLOCKED_P): New macro.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
133 #define INPUT_BLOCKED_P (interrupt_input_blocked > 0)
0e26a0be1ee5 (INPUT_BLOCKED_P): New macro.
Kim F. Storm <storm@cua.dk>
parents: 52401
diff changeset
134
21515
fb4c986db0e2 Add more prototypes.
Andreas Schwab <schwab@suse.de>
parents: 14186
diff changeset
135 /* Defined in keyboard.c */
21796
f7ca88e90856 (reinvoke_input_signal): Don't use prototype decl.
Richard M. Stallman <rms@gnu.org>
parents: 21515
diff changeset
136 /* Don't use a prototype here; it causes trouble in some files. */
f7ca88e90856 (reinvoke_input_signal): Don't use prototype decl.
Richard M. Stallman <rms@gnu.org>
parents: 21515
diff changeset
137 extern void reinvoke_input_signal ();
29926
5a1dca465b50 Protect against multiple inclusion. Include
Dave Love <fx@gnu.org>
parents: 27426
diff changeset
138
5a1dca465b50 Protect against multiple inclusion. Include
Dave Love <fx@gnu.org>
parents: 27426
diff changeset
139 #endif /* EMACS_BLOCKINPUT_H */
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
140
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
141 /* arch-tag: 51a9ec86-945a-4966-8f04-2d1341250e03
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
142 (do not change this comment) */