From aed13378308fae471bf2c11870a456e457166c31 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 11 Jul 2002 14:18:02 +0000 Subject: [PATCH] Use macro SPECPDL_INDEX. --- src/alloc.c | 2 +- src/buffer.c | 8 ++++---- src/bytecode.c | 8 ++++---- src/callint.c | 6 +++--- src/callproc.c | 10 +++++----- src/coding.c | 2 +- src/composite.c | 2 +- src/dired.c | 4 ++-- src/dispnew.c | 2 +- src/editfns.c | 8 ++++---- src/emacs.c | 2 +- src/eval.c | 26 +++++++++++++------------- src/fileio.c | 14 +++++++------- src/fns.c | 4 ++-- src/insdel.c | 2 +- src/keyboard.c | 24 ++++++++++++------------ src/keymap.c | 2 +- src/lread.c | 10 +++++----- src/macfns.c | 6 +++--- src/macmenu.c | 2 +- src/minibuf.c | 8 ++++---- src/print.c | 8 ++++---- src/process.c | 10 +++++----- src/sound.c | 2 +- src/textprop.c | 4 ++-- src/w32fns.c | 2 +- src/w32menu.c | 2 +- src/window.c | 6 +++--- src/xfaces.c | 2 +- src/xmenu.c | 2 +- src/xselect.c | 4 ++-- src/xterm.c | 2 +- 32 files changed, 98 insertions(+), 98 deletions(-) diff --git a/src/alloc.c b/src/alloc.c index e89981c454..50de0a217c 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4020,7 +4020,7 @@ struct backtrace int inhibit_garbage_collection () { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int nbits = min (VALBITS, BITS_PER_INT); specbind (Qgc_cons_threshold, make_number (((EMACS_INT) 1 << (nbits - 1)) - 1)); diff --git a/src/buffer.c b/src/buffer.c index e371b3133a..a5bc8532cf 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1297,7 +1297,7 @@ with SIGHUP. */) /* Run hooks with the buffer to be killed the current buffer. */ { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object list; record_unwind_protect (save_excursion_restore, save_excursion_save ()); @@ -1548,7 +1548,7 @@ the current buffer's major mode. */) if (NILP (function) || EQ (function, Qfundamental_mode)) return Qnil; - count = specpdl_ptr - specpdl; + count = SPECPDL_INDEX (); /* To select a nonfundamental mode, select the buffer temporarily and then call the mode function. */ @@ -3586,7 +3586,7 @@ buffer. */) { struct buffer *b, *ob; Lisp_Object obuffer; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); CHECK_OVERLAY (overlay); if (NILP (buffer)) @@ -3687,7 +3687,7 @@ DEFUN ("delete-overlay", Fdelete_overlay, Sdelete_overlay, 1, 1, 0, { Lisp_Object buffer; struct buffer *b; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); CHECK_OVERLAY (overlay); diff --git a/src/bytecode.c b/src/bytecode.c index 442729e477..7f58b4d17a 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -420,7 +420,7 @@ If the third argument is incorrect, Emacs may crash. */) (bytestr, vector, maxdepth) Lisp_Object bytestr, vector, maxdepth; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); #ifdef BYTE_CODE_METER int this_op = 0; int prev_op; @@ -728,7 +728,7 @@ If the third argument is incorrect, Emacs may crash. */) op -= Bunbind; dounbind: BEFORE_POTENTIAL_GC (); - unbind_to (specpdl_ptr - specpdl - op, Qnil); + unbind_to (SPECPDL_INDEX () - op, Qnil); AFTER_POTENTIAL_GC (); break; @@ -909,7 +909,7 @@ If the third argument is incorrect, Emacs may crash. */) temp_output_buffer_show (TOP); TOP = v1; /* pop binding of standard-output */ - unbind_to (specpdl_ptr - specpdl - 1, Qnil); + unbind_to (SPECPDL_INDEX () - 1, Qnil); AFTER_POTENTIAL_GC (); break; } @@ -1725,7 +1725,7 @@ If the third argument is incorrect, Emacs may crash. */) byte_stack_list = byte_stack_list->next; /* Binds and unbinds are supposed to be compiled balanced. */ - if (specpdl_ptr - specpdl != count) + if (SPECPDL_INDEX () != count) #ifdef BYTE_CODE_SAFE error ("binding stack not balanced (serious byte compiler bug)"); #else diff --git a/src/callint.c b/src/callint.c index 3eca790c6d..4bb5cd57cc 100644 --- a/src/callint.c +++ b/src/callint.c @@ -198,7 +198,7 @@ supply if the command inquires which events were used to invoke it. */) Lisp_Object specs; Lisp_Object teml; Lisp_Object enable; - int speccount = specpdl_ptr - specpdl; + int speccount = SPECPDL_INDEX (); /* The index of the next element of this_command_keys to examine for the 'e' interactive code. */ @@ -541,7 +541,7 @@ supply if the command inquires which events were used to invoke it. */) case 'k': /* Key sequence. */ { - int speccount1 = specpdl_ptr - specpdl; + int speccount1 = SPECPDL_INDEX (); specbind (Qcursor_in_echo_area, Qt); args[i] = Fread_key_sequence (build_string (callint_message), Qnil, Qnil, Qnil, Qnil); @@ -569,7 +569,7 @@ supply if the command inquires which events were used to invoke it. */) case 'K': /* Key sequence to be defined. */ { - int speccount1 = specpdl_ptr - specpdl; + int speccount1 = SPECPDL_INDEX (); specbind (Qcursor_in_echo_area, Qt); args[i] = Fread_key_sequence (build_string (callint_message), Qnil, Qt, Qnil, Qnil); diff --git a/src/callproc.c b/src/callproc.c index f671c04441..c95055c67a 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -172,7 +172,7 @@ call_process_cleanup (fdpid) if (EMACS_KILLPG (pid, SIGINT) == 0) { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); record_unwind_protect (call_process_kill, fdpid); message1 ("Waiting for process to die...(type C-g again to kill it instantly)"); immediate_quit = 1; @@ -220,7 +220,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) char buf[16384]; char *bufptr = buf; int bufsize = 16384; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); register unsigned char **new_argv = (unsigned char **) alloca ((max (2, nargs - 2)) * sizeof (char *)); @@ -936,7 +936,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) } { - int post_read_count = specpdl_ptr - specpdl; + int post_read_count = SPECPDL_INDEX (); record_unwind_protect (save_excursion_restore, save_excursion_save ()); inserted = PT - pt_orig; @@ -1017,7 +1017,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r struct gcpro gcpro1; Lisp_Object filename_string; register Lisp_Object start, end; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); /* Qt denotes we have not yet called Ffind_operation_coding_system. */ Lisp_Object coding_systems; Lisp_Object val, *args2; @@ -1091,7 +1091,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r } { - int count1 = specpdl_ptr - specpdl; + int count1 = SPECPDL_INDEX (); specbind (intern ("coding-system-for-write"), val); Fwrite_region (start, end, filename_string, Qnil, Qlambda, Qnil, Qnil); diff --git a/src/coding.c b/src/coding.c index 0c4f20f125..af23b63676 100644 --- a/src/coding.c +++ b/src/coding.c @@ -5804,7 +5804,7 @@ run_pre_post_conversion_on_str (str, coding, encodep) struct coding_system *coding; int encodep; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); struct gcpro gcpro1; int multibyte = STRING_MULTIBYTE (str); Lisp_Object buffer; diff --git a/src/composite.c b/src/composite.c index 985f628f79..8a8406587e 100644 --- a/src/composite.c +++ b/src/composite.c @@ -612,7 +612,7 @@ compose_chars_in_text (start, end, string) if (STRINGP (string)) { - count = specpdl_ptr - specpdl; + count = SPECPDL_INDEX (); GCPRO1 (string); stop = end; ptr = XSTRING (string)->data + string_char_to_byte (string, start); diff --git a/src/dired.c b/src/dired.c index 4b6b94d812..0a119afb5e 100644 --- a/src/dired.c +++ b/src/dired.c @@ -144,7 +144,7 @@ directory_files_internal (directory, full, match, nosort, attrs) Lisp_Object list, dirfilename, encoded_directory; struct re_pattern_buffer *bufp = NULL; int needsep = 0; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; DIRENTRY *dp; int retry_p; @@ -473,7 +473,7 @@ file_name_completion (file, dirname, all_flag, ver_flag) struct stat st; int directoryp; int passcount; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; elt = Qnil; diff --git a/src/dispnew.c b/src/dispnew.c index 35c1b87a88..59cc06b19e 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5928,7 +5928,7 @@ change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe) int newheight, newwidth, pretend, delay, safe; { int new_frame_window_width; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); /* If we can't deal with the change now, queue it for later. */ if (delay || (redisplaying_p && !safe)) diff --git a/src/editfns.c b/src/editfns.c index a2e2aaf269..72da635a9b 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -851,7 +851,7 @@ usage: (save-excursion &rest BODY) */) Lisp_Object args; { register Lisp_Object val; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); record_unwind_protect (save_excursion_restore, save_excursion_save ()); @@ -867,7 +867,7 @@ usage: (save-current-buffer &rest BODY) */) Lisp_Object args; { Lisp_Object val; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); @@ -2482,7 +2482,7 @@ Both characters must have the same length of multi-byte form. */) int changed = 0; unsigned char fromstr[MAX_MULTIBYTE_LENGTH], tostr[MAX_MULTIBYTE_LENGTH]; unsigned char *p; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); #define COMBINING_NO 0 #define COMBINING_BEFORE 1 #define COMBINING_AFTER 2 @@ -2894,7 +2894,7 @@ usage: (save-restriction &rest BODY) */) Lisp_Object body; { register Lisp_Object val; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); record_unwind_protect (save_restriction_restore, save_restriction_save ()); val = Fprogn (body); diff --git a/src/emacs.c b/src/emacs.c index 7065b69e2f..f52af3e6fa 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -425,7 +425,7 @@ init_cmdargs (argc, argv, skip_args) { register int i; Lisp_Object name, dir, tem; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object raw_name; initial_argv = argv; diff --git a/src/eval.c b/src/eval.c index 569b57f5ae..8dd2d734e1 100644 --- a/src/eval.c +++ b/src/eval.c @@ -231,7 +231,7 @@ call_debugger (arg) Lisp_Object arg; { int debug_while_redisplaying; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object val; if (lisp_eval_depth + 20 > max_lisp_eval_depth) @@ -864,7 +864,7 @@ usage: (let* VARLIST BODY...) */) Lisp_Object args; { Lisp_Object varlist, val, elt; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3; GCPRO3 (args, elt, varlist); @@ -904,7 +904,7 @@ usage: (let VARLIST BODY...) */) { Lisp_Object *temps, tem; register Lisp_Object elt, varlist; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); register int argnum; struct gcpro gcpro1, gcpro2; @@ -1095,7 +1095,7 @@ internal_catch (tag, func, arg) c.backlist = backtrace_list; c.handlerlist = handlerlist; c.lisp_eval_depth = lisp_eval_depth; - c.pdlcount = specpdl_ptr - specpdl; + c.pdlcount = SPECPDL_INDEX (); c.poll_suppress_count = poll_suppress_count; c.gcpro = gcprolist; c.byte_stack = byte_stack_list; @@ -1196,7 +1196,7 @@ usage: (unwind-protect BODYFORM UNWINDFORMS...) */) Lisp_Object args; { Lisp_Object val; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); record_unwind_protect (0, Fcdr (args)); val = Feval (Fcar (args)); @@ -1262,7 +1262,7 @@ usage: (condition-case VAR BODYFORM HANDLERS...) */) c.backlist = backtrace_list; c.handlerlist = handlerlist; c.lisp_eval_depth = lisp_eval_depth; - c.pdlcount = specpdl_ptr - specpdl; + c.pdlcount = SPECPDL_INDEX (); c.poll_suppress_count = poll_suppress_count; c.gcpro = gcprolist; c.byte_stack = byte_stack_list; @@ -1327,7 +1327,7 @@ internal_condition_case (bfun, handlers, hfun) c.backlist = backtrace_list; c.handlerlist = handlerlist; c.lisp_eval_depth = lisp_eval_depth; - c.pdlcount = specpdl_ptr - specpdl; + c.pdlcount = SPECPDL_INDEX (); c.poll_suppress_count = poll_suppress_count; c.gcpro = gcprolist; c.byte_stack = byte_stack_list; @@ -1367,7 +1367,7 @@ internal_condition_case_1 (bfun, arg, handlers, hfun) c.backlist = backtrace_list; c.handlerlist = handlerlist; c.lisp_eval_depth = lisp_eval_depth; - c.pdlcount = specpdl_ptr - specpdl; + c.pdlcount = SPECPDL_INDEX (); c.poll_suppress_count = poll_suppress_count; c.gcpro = gcprolist; c.byte_stack = byte_stack_list; @@ -1410,7 +1410,7 @@ internal_condition_case_2 (bfun, nargs, args, handlers, hfun) c.backlist = backtrace_list; c.handlerlist = handlerlist; c.lisp_eval_depth = lisp_eval_depth; - c.pdlcount = specpdl_ptr - specpdl; + c.pdlcount = SPECPDL_INDEX (); c.poll_suppress_count = poll_suppress_count; c.gcpro = gcprolist; c.byte_stack = byte_stack_list; @@ -1646,7 +1646,7 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr) || !NILP (Vdebug_on_signal)) /* This says call debugger even if there is a handler. */ { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int debugger_called = 0; Lisp_Object sig_symbol, combined_data; /* This is set to 1 if we are handling a memory-full error, @@ -1914,7 +1914,7 @@ void do_autoload (fundef, funname) Lisp_Object fundef, funname; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object fun, queue, first, second; struct gcpro gcpro1, gcpro2, gcpro3; @@ -2860,7 +2860,7 @@ funcall_lambda (fun, nargs, arg_vector) register Lisp_Object *arg_vector; { Lisp_Object val, syms_left, next; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int i, optional, rest; if (CONSP (fun)) @@ -2953,7 +2953,7 @@ DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode, void grow_specpdl () { - register int count = specpdl_ptr - specpdl; + register int count = SPECPDL_INDEX (); if (specpdl_size >= max_specpdl_size) { if (max_specpdl_size < 400) diff --git a/src/fileio.c b/src/fileio.c index dd3872ecbf..68425e5daf 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2371,7 +2371,7 @@ A prefix arg makes KEEP-TIME non-nil. */) struct stat st, out_st; Lisp_Object handler; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int input_file_statable_p; Lisp_Object encoded_file, encoded_newname; @@ -4395,7 +4395,7 @@ actually used. */) this way, we can run Lisp program safely before decoding the inserted text. */ Lisp_Object unwind_data; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); unwind_data = Fcons (current_buffer->enable_multibyte_characters, Fcons (current_buffer->undo_list, @@ -4753,7 +4753,7 @@ This does code conversion according to the value of unsigned char *fn; struct stat st; int tem; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int count1; #ifdef VMS unsigned char *fname = 0; /* If non-0, original filename (must rename) */ @@ -4825,7 +4825,7 @@ This does code conversion according to the value of } record_unwind_protect (build_annotations_unwind, Fcurrent_buffer ()); - count1 = specpdl_ptr - specpdl; + count1 = SPECPDL_INDEX (); given_buffer = current_buffer; @@ -5594,7 +5594,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) Lisp_Object oquit; FILE *stream; Lisp_Object lispstream; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int orig_minibuffer_auto_raise = minibuffer_auto_raise; int message_p = 0; @@ -5941,7 +5941,7 @@ DEFUN ("read-file-name-internal", Fread_file_name_internal, Sread_file_name_inte { /* Must do it the hard (and slow) way. */ GCPRO3 (all, comp, specdir); - count = specpdl_ptr - specpdl; + count = SPECPDL_INDEX (); record_unwind_protect (read_file_name_cleanup, current_buffer->directory); current_buffer->directory = realdir; for (comp = Qnil; CONSP (all); all = XCDR (all)) @@ -6074,7 +6074,7 @@ provides a file dialog box. */) RETURN_UNGCPRO (Ffuncall (7, args)); } - count = specpdl_ptr - specpdl; + count = SPECPDL_INDEX (); #ifdef VMS specbind (intern ("completion-ignore-case"), Qt); #endif diff --git a/src/fns.c b/src/fns.c index 83e7353eb9..01d368ba3d 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2935,7 +2935,7 @@ is nil and `use-dialog-box' is non-nil. */) Lisp_Object xprompt; Lisp_Object args[2]; struct gcpro gcpro1, gcpro2; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); specbind (Qcursor_in_echo_area, Qt); @@ -3250,7 +3250,7 @@ The normal messages at start and end of loading FILENAME are suppressed. */) if (NILP (tem)) { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int nesting = 0; /* This is to make sure that loadup.el gives a clear picture diff --git a/src/insdel.c b/src/insdel.c index 5bec29ea92..1028bc40c4 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2205,7 +2205,7 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute, doc: /* This function is for use internally in `combine-after-change-calls'. */) () { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int beg, end, change; int begpos, endpos; Lisp_Object tail; diff --git a/src/keyboard.c b/src/keyboard.c index 2c75e1cd87..acd26a957c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -934,7 +934,7 @@ add_command_key (key) Lisp_Object recursive_edit_1 () { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object val; if (command_loop_level > 0) @@ -1000,7 +1000,7 @@ Alternately, `(throw 'exit t)' makes this function signal an error. This function is called by the editor initialization to begin editing. */) () { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object buffer; command_loop_level++; @@ -1407,7 +1407,7 @@ command_loop_1 () { /* Bind inhibit-quit to t so that C-g gets read in rather than quitting back to the minibuffer. */ - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); specbind (Qinhibit_quit, Qt); Fsit_for (Vminibuffer_message_timeout, Qnil, Qnil); @@ -1838,7 +1838,7 @@ void safe_run_hooks (hook) Lisp_Object hook; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); specbind (Qinhibit_quit, hook); internal_condition_case (safe_run_hooks_1, Qt, safe_run_hooks_error); @@ -2813,7 +2813,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) Lisp_Object keys; int key_count; struct gcpro gcpro1; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); /* Save the echo status. */ int saved_immediate_echo = current_kboard->immediate_echo; @@ -2943,7 +2943,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) if (!NILP (Vhelp_form) && help_char_p (c)) { Lisp_Object tem0; - count = specpdl_ptr - specpdl; + count = SPECPDL_INDEX (); record_unwind_protect (Fset_window_configuration, Fcurrent_window_configuration (Qnil)); @@ -3223,7 +3223,7 @@ usage: (track-mouse BODY ...) */) (args) Lisp_Object args; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object val; record_unwind_protect (tracking_off, do_mouse_tracking); @@ -6789,7 +6789,7 @@ Lisp_Object menu_item_eval_property (sexpr) Lisp_Object sexpr; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object val; specbind (Qinhibit_redisplay, Qt); val = internal_condition_case_1 (Feval, sexpr, Qerror, @@ -8005,7 +8005,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, int fix_current_buffer; { volatile Lisp_Object from_string; - volatile int count = specpdl_ptr - specpdl; + volatile int count = SPECPDL_INDEX (); /* How many keys there are in the current key sequence. */ volatile int t; @@ -9187,7 +9187,7 @@ will read just one key sequence. */) Lisp_Object keybuf[30]; register int i; struct gcpro gcpro1; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); if (!NILP (prompt)) CHECK_STRING (prompt); @@ -9246,7 +9246,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, Lisp_Object keybuf[30]; register int i; struct gcpro gcpro1; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); if (!NILP (prompt)) CHECK_STRING (prompt); @@ -9797,7 +9797,7 @@ On such systems, Emacs starts a subshell instead of suspending. */) (stuffstring) Lisp_Object stuffstring; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int old_height, old_width; int width, height; struct gcpro gcpro1; diff --git a/src/keymap.c b/src/keymap.c index 24252e0b11..d811d1727f 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -3121,7 +3121,7 @@ This is text showing the elements of vector matched against indices. */) (vector, describer) Lisp_Object vector, describer; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); if (NILP (describer)) describer = intern ("princ"); specbind (Qstandard_output, Fcurrent_buffer ()); diff --git a/src/lread.c b/src/lread.c index e40d5680c8..aaab4fd8f6 100644 --- a/src/lread.c +++ b/src/lread.c @@ -660,7 +660,7 @@ Return t if file exists. */) register FILE *stream; register int fd = -1; register Lisp_Object lispstream; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object temp; struct gcpro gcpro1; Lisp_Object found, efound; @@ -1271,7 +1271,7 @@ readevalloop (readcharfun, stream, sourcename, evalfun, printflag, unibyte, read { register int c; register Lisp_Object val; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); struct gcpro gcpro1; struct buffer *b = 0; int continue_reading_p; @@ -1313,7 +1313,7 @@ readevalloop (readcharfun, stream, sourcename, evalfun, printflag, unibyte, read if (!NILP (Vpurify_flag) && c == '(') { - int count1 = specpdl_ptr - specpdl; + int count1 = SPECPDL_INDEX (); record_unwind_protect (unreadpure, Qnil); val = read_list (-1, readcharfun); unbind_to (count1, Qnil); @@ -1379,7 +1379,7 @@ This function preserves the position of point. */) (buffer, printflag, filename, unibyte, do_allow_print) Lisp_Object buffer, printflag, filename, unibyte, do_allow_print; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object tem, buf; if (NILP (buffer)) @@ -1421,7 +1421,7 @@ This function does not move point. */) (start, end, printflag, read_function) Lisp_Object start, end, printflag, read_function; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object tem, cbuf; cbuf = Fcurrent_buffer (); diff --git a/src/macfns.c b/src/macfns.c index 4366854ff1..9a9baed37a 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -9304,7 +9304,7 @@ x_create_tip_frame (dpyinfo, parms) Lisp_Object name; long window_prompting = 0; int width, height; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3; struct kboard *kb; @@ -9562,7 +9562,7 @@ DY added (default is 10). */) unsigned pmask; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; int old_windows_or_buffers_changed = windows_or_buffers_changed; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); specbind (Qinhibit_redisplay, Qt); @@ -9787,7 +9787,7 @@ selection dialog's entry field, if MUSTMATCH is non-nil. */) { struct frame *f = SELECTED_FRAME (); Lisp_Object file = Qnil; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; char filename[MAX_PATH + 1]; char init_dir[MAX_PATH + 1]; diff --git a/src/macmenu.c b/src/macmenu.c index 5976dad767..15190a7813 100644 --- a/src/macmenu.c +++ b/src/macmenu.c @@ -1369,7 +1369,7 @@ set_frame_menubar (f, first_time, deep_p) struct buffer *prev = current_buffer; Lisp_Object buffer; - int specpdl_count = specpdl_ptr - specpdl; + int specpdl_count = SPECPDL_INDEX (); int previous_menu_items_used = f->menu_bar_items_used; Lisp_Object *previous_items = (Lisp_Object *) alloca (previous_menu_items_used diff --git a/src/minibuf.c b/src/minibuf.c index 3886d31bc2..00380392ef 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -409,7 +409,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag, int inherit_input_method; { Lisp_Object val; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object mini_frame, ambient_dir, minibuffer, input_method; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; Lisp_Object enable_multibyte; @@ -732,7 +732,7 @@ get_minibuffer (depth) } else { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); reset_buffer (XBUFFER (buf)); record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); @@ -793,7 +793,7 @@ read_minibuf_unwind (data) /* Erase the minibuffer we were using at this level. */ { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); /* Prevent error in erase-buffer. */ specbind (Qinhibit_read_only, Qt); specbind (Qinhibit_modification_hooks, Qt); @@ -1528,7 +1528,7 @@ Completion ignores case if the ambient value of Lisp_Object val, histvar, histpos, position; Lisp_Object init; int pos = 0; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); struct gcpro gcpro1; init = initial_input; diff --git a/src/print.c b/src/print.c index 98a4c745a8..90d55615bc 100644 --- a/src/print.c +++ b/src/print.c @@ -192,7 +192,7 @@ void print_interval (); struct buffer *old = current_buffer; \ int old_point = -1, start_point = -1; \ int old_point_byte = -1, start_point_byte = -1; \ - int specpdl_count = specpdl_ptr - specpdl; \ + int specpdl_count = SPECPDL_INDEX (); \ int free_print_buffer = 0; \ int multibyte = !NILP (current_buffer->enable_multibyte_characters); \ Lisp_Object original @@ -580,7 +580,7 @@ void temp_output_buffer_setup (bufname) char *bufname; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); register struct buffer *old = current_buffer; register Lisp_Object buf; @@ -613,7 +613,7 @@ internal_with_output_to_temp_buffer (bufname, function, args) Lisp_Object (*function) P_ ((Lisp_Object)); Lisp_Object args; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object buf, val; struct gcpro gcpro1; @@ -658,7 +658,7 @@ usage: (with-output-to-temp-buffer BUFFNAME BODY ...) */) { struct gcpro gcpro1; Lisp_Object name; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object buf, val; GCPRO1(args); diff --git a/src/process.c b/src/process.c index c5cbf3b68e..7c3b177949 100644 --- a/src/process.c +++ b/src/process.c @@ -1292,7 +1292,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) register unsigned char **new_argv; #endif register int i; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); buffer = args[1]; if (!NILP (buffer)) @@ -2552,7 +2552,7 @@ usage: (make-network-process &rest ARGS) */) int s = -1, outch, inch; struct gcpro gcpro1; int retry = 0; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int count1; Lisp_Object QCaddress; /* one of QClocal or QCremote */ Lisp_Object tem; @@ -2843,7 +2843,7 @@ usage: (make-network-process &rest ARGS) */) } /* Do this in case we never enter the for-loop below. */ - count1 = specpdl_ptr - specpdl; + count1 = SPECPDL_INDEX (); s = -1; for (lres = res; lres; lres = lres->ai_next) @@ -4348,7 +4348,7 @@ read_process_output (proc, channel) /* We inhibit quit here instead of just catching it so that hitting ^G when a filter happens to be running won't screw it up. */ - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object odeactivate; Lisp_Object obuffer, okeymap; Lisp_Object text; @@ -5734,7 +5734,7 @@ exec_sentinel (proc, reason) { Lisp_Object sentinel, obuffer, odeactivate, okeymap; register struct Lisp_Process *p = XPROCESS (proc); - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int outer_running_asynch_code = running_asynch_code; int waiting = waiting_for_user_input_p; diff --git a/src/sound.c b/src/sound.c index 4504e7e6ee..90fe5f524c 100644 --- a/src/sound.c +++ b/src/sound.c @@ -402,7 +402,7 @@ Internal use only, use `play-sound' instead. */) struct sound_device sd; struct sound s; Lisp_Object args[2]; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); file = Qnil; GCPRO2 (sound, file); diff --git a/src/textprop.c b/src/textprop.c index f6b7dab421..3e742476a1 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -784,7 +784,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */) else { Lisp_Object initial_value, value; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); if (! NILP (object)) CHECK_BUFFER (object); @@ -849,7 +849,7 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */) } else { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); if (! NILP (object)) CHECK_BUFFER (object); diff --git a/src/w32fns.c b/src/w32fns.c index fc3d67fef0..88d30931d5 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -14301,7 +14301,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) { struct frame *f = SELECTED_FRAME (); Lisp_Object file = Qnil; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; char filename[MAX_PATH + 1]; char init_dir[MAX_PATH + 1]; diff --git a/src/w32menu.c b/src/w32menu.c index 4f07c53442..c27ad03110 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1347,7 +1347,7 @@ set_frame_menubar (f, first_time, deep_p) struct buffer *prev = current_buffer; Lisp_Object buffer; - int specpdl_count = specpdl_ptr - specpdl; + int specpdl_count = SPECPDL_INDEX (); int previous_menu_items_used = f->menu_bar_items_used; Lisp_Object *previous_items = (Lisp_Object *) alloca (previous_menu_items_used diff --git a/src/window.c b/src/window.c index 7bfa8e3290..0bacf5fd54 100644 --- a/src/window.c +++ b/src/window.c @@ -2664,7 +2664,7 @@ set_window_buffer (window, buffer, run_hooks_p) { struct window *w = XWINDOW (window); struct buffer *b = XBUFFER (buffer); - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); w->buffer = buffer; @@ -3174,7 +3174,7 @@ temp_output_buffer_show (buf) tem = Fsymbol_value (Qtemp_buffer_show_hook); if (!NILP (tem)) { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object prev_window; prev_window = selected_window; @@ -5462,7 +5462,7 @@ usage: (save-window-excursion BODY ...) */) Lisp_Object args; { register Lisp_Object val; - register int count = specpdl_ptr - specpdl; + register int count = SPECPDL_INDEX (); record_unwind_protect (Fset_window_configuration, Fcurrent_window_configuration (Qnil)); diff --git a/src/xfaces.c b/src/xfaces.c index 2f6a449759..085a092975 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -2844,7 +2844,7 @@ are fixed-pitch. */) struct font_name *fonts; Lisp_Object result; struct gcpro gcpro1; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); int limit; /* Let's consider all fonts. Increase the limit for matching diff --git a/src/xmenu.c b/src/xmenu.c index 1c5949ebb5..35ddfe9258 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1654,7 +1654,7 @@ set_frame_menubar (f, first_time, deep_p) struct buffer *prev = current_buffer; Lisp_Object buffer; - int specpdl_count = specpdl_ptr - specpdl; + int specpdl_count = SPECPDL_INDEX (); int previous_menu_items_used = f->menu_bar_items_used; Lisp_Object *previous_items = (Lisp_Object *) alloca (previous_menu_items_used diff --git a/src/xselect.c b/src/xselect.c index 2da3eddfc9..1d5fe0b8ea 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -414,7 +414,7 @@ x_get_local_selection (selection_symbol, target_type) /* Don't allow a quit within the converter. When the user types C-g, he would be surprised if by luck it came during a converter. */ - count = specpdl_ptr - specpdl; + count = SPECPDL_INDEX (); specbind (Qinhibit_quit, Qt); CHECK_SYMBOL (target_type); @@ -1074,7 +1074,7 @@ wait_for_property_change (location) struct prop_location *location; { int secs, usecs; - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); Lisp_Object tem; tem = Fcons (Qnil, Qnil); diff --git a/src/xterm.c b/src/xterm.c index 1a3b52473a..0067643c89 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -12123,7 +12123,7 @@ int x_catch_errors (dpy) Display *dpy; { - int count = specpdl_ptr - specpdl; + int count = SPECPDL_INDEX (); /* Make sure any errors from previous requests have been dealt with. */ XSync (dpy, False); -- 2.20.1