diff options
| author | Karoly Lorentey | 2005-03-16 15:59:10 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-03-16 15:59:10 +0000 |
| commit | a810eaf92838985d9648acb470dc3c8d26847c15 (patch) | |
| tree | 026be88abb42bb9bbfcf6574e532f4339b82f211 /src | |
| parent | 3453bb3a36766b297909a2b1aae2681258ab3118 (diff) | |
| parent | 613f367343dc8e9ab03519472d7b49895f184ab1 (diff) | |
| download | emacs-a810eaf92838985d9648acb470dc3c8d26847c15.tar.gz emacs-a810eaf92838985d9648acb470dc3c8d26847c15.zip | |
Merged from miles@gnu.org--gnu-2005 (patch 159)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-159
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-307
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 17 | ||||
| -rw-r--r-- | src/blockinput.h | 25 | ||||
| -rw-r--r-- | src/eval.c | 9 | ||||
| -rw-r--r-- | src/keyboard.c | 5 | ||||
| -rw-r--r-- | src/lisp.h | 5 |
5 files changed, 54 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index dc48d647216..fc2ded6ce94 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2005-03-06 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * keyboard.c (Ftop_level): Let Fthrow deal with UNBLOCK_INPUT. | ||
| 4 | |||
| 5 | * eval.c (unwind_to_catch): Use UNBLOCK_INPUT_TO. | ||
| 6 | (Feval, Ffuncall): Use CHECK_CONS_LIST. | ||
| 7 | |||
| 8 | * lisp.h (CHECK_CONS_LIST): New macro (two definitions). | ||
| 9 | |||
| 10 | * blockinput.h (UNBLOCK_INPUT_TO): New macro. | ||
| 11 | (TOTALLY_UNBLOCK_INPUT): Handle a pending signal if any. | ||
| 12 | |||
| 1 | 2005-03-05 Juri Linkov <juri@jurta.org> | 13 | 2005-03-05 Juri Linkov <juri@jurta.org> |
| 2 | 14 | ||
| 3 | * emacs.c (USAGE1): Replace Info node name "command arguments" | 15 | * emacs.c (USAGE1): Replace Info node name "command arguments" |
| @@ -107,6 +119,11 @@ | |||
| 107 | 119 | ||
| 108 | * keyboard.c (Fposn_at_x_y): Check integerness of X and Y. | 120 | * keyboard.c (Fposn_at_x_y): Check integerness of X and Y. |
| 109 | 121 | ||
| 122 | 2005-02-27 Richard M. Stallman <rms@gnu.org> | ||
| 123 | |||
| 124 | * xdisp.c (fast_find_position): Rename END to BEG. | ||
| 125 | (syms_of_xdisp) <menu-bar-update-hook>: Doc fix. | ||
| 126 | |||
| 110 | 2005-02-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 127 | 2005-02-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 111 | 128 | ||
| 112 | * gtkutil.c (xg_resize_outer_widget): Remove unneeded call to | 129 | * gtkutil.c (xg_resize_outer_widget): Remove unneeded call to |
diff --git a/src/blockinput.h b/src/blockinput.h index a4c8a9b9c22..a3b50d2a0f2 100644 --- a/src/blockinput.h +++ b/src/blockinput.h | |||
| @@ -94,7 +94,30 @@ extern int pending_atimers; | |||
| 94 | } \ | 94 | } \ |
| 95 | while (0) | 95 | while (0) |
| 96 | 96 | ||
| 97 | #define TOTALLY_UNBLOCK_INPUT (interrupt_input_blocked = 0) | 97 | /* Undo any number of BLOCK_INPUT calls, |
| 98 | and also reinvoke any pending signal. */ | ||
| 99 | |||
| 100 | #define TOTALLY_UNBLOCK_INPUT \ | ||
| 101 | if (interrupt_input_blocked != 0) \ | ||
| 102 | { \ | ||
| 103 | interrupt_input_blocked = 1; \ | ||
| 104 | UNBLOCK_INPUT; \ | ||
| 105 | } \ | ||
| 106 | else | ||
| 107 | |||
| 108 | /* Undo any number of BLOCK_INPUT calls down to level LEVEL, | ||
| 109 | and also (if the level is now 0) reinvoke any pending signal. */ | ||
| 110 | |||
| 111 | #define UNBLOCK_INPUT_TO(LEVEL) \ | ||
| 112 | do \ | ||
| 113 | { \ | ||
| 114 | int oldlevel = interrupt_input_blocked; \ | ||
| 115 | interrupt_input_blocked = (LEVEL) + 1; \ | ||
| 116 | if (interrupt_input_blocked != oldlevel + 1) \ | ||
| 117 | UNBLOCK_INPUT; \ | ||
| 118 | } \ | ||
| 119 | while (0) | ||
| 120 | |||
| 98 | #define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT | 121 | #define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT |
| 99 | 122 | ||
| 100 | /* In critical section ? */ | 123 | /* In critical section ? */ |
diff --git a/src/eval.c b/src/eval.c index 83e16360473..bf4fec4f8a1 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1176,7 +1176,7 @@ unwind_to_catch (catch, value) | |||
| 1176 | 1176 | ||
| 1177 | /* Restore certain special C variables. */ | 1177 | /* Restore certain special C variables. */ |
| 1178 | set_poll_suppress_count (catch->poll_suppress_count); | 1178 | set_poll_suppress_count (catch->poll_suppress_count); |
| 1179 | interrupt_input_blocked = catch->interrupt_input_blocked; | 1179 | UNBLOCK_INPUT_TO (catch->interrupt_input_blocked); |
| 1180 | handling_signal = 0; | 1180 | handling_signal = 0; |
| 1181 | immediate_quit = 0; | 1181 | immediate_quit = 0; |
| 1182 | 1182 | ||
| @@ -2067,6 +2067,8 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, | |||
| 2067 | args_left = original_args; | 2067 | args_left = original_args; |
| 2068 | numargs = Flength (args_left); | 2068 | numargs = Flength (args_left); |
| 2069 | 2069 | ||
| 2070 | CHECK_CONS_LIST (); | ||
| 2071 | |||
| 2070 | if (XINT (numargs) < XSUBR (fun)->min_args || | 2072 | if (XINT (numargs) < XSUBR (fun)->min_args || |
| 2071 | (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < XINT (numargs))) | 2073 | (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < XINT (numargs))) |
| 2072 | return Fsignal (Qwrong_number_of_arguments, Fcons (fun, Fcons (numargs, Qnil))); | 2074 | return Fsignal (Qwrong_number_of_arguments, Fcons (fun, Fcons (numargs, Qnil))); |
| @@ -2190,6 +2192,8 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, | |||
| 2190 | return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); | 2192 | return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); |
| 2191 | } | 2193 | } |
| 2192 | done: | 2194 | done: |
| 2195 | CHECK_CONS_LIST (); | ||
| 2196 | |||
| 2193 | lisp_eval_depth--; | 2197 | lisp_eval_depth--; |
| 2194 | if (backtrace.debug_on_exit) | 2198 | if (backtrace.debug_on_exit) |
| 2195 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); | 2199 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); |
| @@ -2746,6 +2750,8 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 2746 | 2750 | ||
| 2747 | if (SUBRP (fun)) | 2751 | if (SUBRP (fun)) |
| 2748 | { | 2752 | { |
| 2753 | CHECK_CONS_LIST (); | ||
| 2754 | |||
| 2749 | if (numargs < XSUBR (fun)->min_args | 2755 | if (numargs < XSUBR (fun)->min_args |
| 2750 | || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) | 2756 | || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) |
| 2751 | { | 2757 | { |
| @@ -2844,6 +2850,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 2844 | return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); | 2850 | return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); |
| 2845 | } | 2851 | } |
| 2846 | done: | 2852 | done: |
| 2853 | CHECK_CONS_LIST (); | ||
| 2847 | lisp_eval_depth--; | 2854 | lisp_eval_depth--; |
| 2848 | if (backtrace.debug_on_exit) | 2855 | if (backtrace.debug_on_exit) |
| 2849 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); | 2856 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); |
diff --git a/src/keyboard.c b/src/keyboard.c index 3da16b82271..3fa6240381e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1335,11 +1335,6 @@ DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "", | |||
| 1335 | cancel_hourglass (); | 1335 | cancel_hourglass (); |
| 1336 | #endif | 1336 | #endif |
| 1337 | 1337 | ||
| 1338 | /* Unblock input if we enter with input blocked. This may happen if | ||
| 1339 | redisplay traps e.g. during tool-bar update with input blocked. */ | ||
| 1340 | while (INPUT_BLOCKED_P) | ||
| 1341 | UNBLOCK_INPUT; | ||
| 1342 | |||
| 1343 | return Fthrow (Qtop_level, Qnil); | 1338 | return Fthrow (Qtop_level, Qnil); |
| 1344 | } | 1339 | } |
| 1345 | 1340 | ||
diff --git a/src/lisp.h b/src/lisp.h index cff80f1d090..f677eee0953 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -53,6 +53,11 @@ Boston, MA 02111-1307, USA. */ | |||
| 53 | 53 | ||
| 54 | #endif /* 0 */ | 54 | #endif /* 0 */ |
| 55 | 55 | ||
| 56 | #ifdef GC_CHECK_CONS_LIST | ||
| 57 | #define CHECK_CONS_LIST() check_cons_list() | ||
| 58 | #else | ||
| 59 | #define CHECK_CONS_LIST() 0 | ||
| 60 | #endif | ||
| 56 | 61 | ||
| 57 | /* These are default choices for the types to use. */ | 62 | /* These are default choices for the types to use. */ |
| 58 | #ifdef _LP64 | 63 | #ifdef _LP64 |