comparison src/eval.c @ 1333:1b0339b048ce

[xemacs-hg @ 2003-03-02 09:38:37 by ben] To: xemacs-patches@xemacs.org PROBLEMS: Include nt/PROBLEMS and update. Add note about incremental linking badness. cmdloop.el, custom.el, dumped-lisp.el, files.el, keydefs.el, keymap.el, lisp-mode.el, make-docfile.el, replace.el, simple.el, subr.el, view-less.el, wid-edit.el: Lots of syncing with FSF 21.2. Use if-fboundp in wid-edit.el. New file newcomment.el from FSF. internals/internals.texi: Fix typo. (Build-Time Dependencies): New node. PROBLEMS: Delete. config.inc.samp, xemacs.mak: Eliminate HAVE_VC6, use SUPPORT_EDIT_AND_CONTINUE in its place. No incremental linking unless SUPPORT_EDIT_AND_CONTINUE, since it can cause nasty crashes in pdump. Put warnings about this in config.inc.samp. Report the full compile flags used for src and lib-src in the Installation output. alloc.c, lisp.h, ralloc.c, regex.c: Use ALLOCA() in regex.c to avoid excessive stack allocation. Also fix subtle problem with REL_ALLOC() -- any call to malloc() (direct or indirect) may relocate rel-alloced data, causing buffer text to shift. After any such call, regex must update all its pointers to such data. Add a system, when ERROR_CHECK_MALLOC, whereby regex.c indicates all the places it is prepared to handle malloc()/realloc()/free(), and any calls anywhere in XEmacs outside of this will trigger an abort. alloc.c, dialog-msw.c, eval.c, event-stream.c, general-slots.h, insdel.c, lisp.h, menubar-msw.c, menubar-x.c: Change *run_hook*_trapping_problems to take a warning class, not a string. Factor out code to issue warnings, add flag to call_trapping_problems() to postpone warning issue, and make *run_hook*_trapping_problems issue their own warnings tailored to the hook, postponed in the case of safe_run_hook_trapping_problems() so that the appropriate message can be issued about resetting to nil only when not `quit'. Make record_unwind_protect_restoring_int() non-static. dumper.c: Issue notes about incremental linking problems under Windows. fileio.c: Mule-ize encrypt/decrypt-string code. text.h: Spacing changes.
author ben
date Sun, 02 Mar 2003 09:38:54 +0000
parents 0e48d8b45bdb
children ac1be85b4a5f
comparison
equal deleted inserted replaced
1332:6aa23bb3da6b 1333:1b0339b048ce
3744 3744
3745 args[0] = Qpost_gc_hook; 3745 args[0] = Qpost_gc_hook;
3746 args[1] = Fcons (Fcons (Qfinalize_list, zap_finalize_list ()), Qnil); 3746 args[1] = Fcons (Fcons (Qfinalize_list, zap_finalize_list ()), Qnil);
3747 3747
3748 run_hook_with_args_trapping_problems 3748 run_hook_with_args_trapping_problems
3749 ("Error in post-gc-hook", 3749 (Qgarbage_collecting, 2, args, RUN_HOOKS_TO_COMPLETION,
3750 2, args,
3751 RUN_HOOKS_TO_COMPLETION,
3752 INHIBIT_QUIT | NO_INHIBIT_ERRORS); 3750 INHIBIT_QUIT | NO_INHIBIT_ERRORS);
3753 } 3751 }
3754 3752
3755 DEFUN ("funcall", Ffuncall, 1, MANY, 0, /* 3753 DEFUN ("funcall", Ffuncall, 1, MANY, 0, /*
3756 Call first argument as a function, passing the remaining arguments to it. 3754 Call first argument as a function, passing the remaining arguments to it.
4816 flagged_a_squirmer (Lisp_Object error_conditions, Lisp_Object data, 4814 flagged_a_squirmer (Lisp_Object error_conditions, Lisp_Object data,
4817 Lisp_Object opaque) 4815 Lisp_Object opaque)
4818 { 4816 {
4819 struct call_trapping_problems *p = 4817 struct call_trapping_problems *p =
4820 (struct call_trapping_problems *) get_opaque_ptr (opaque); 4818 (struct call_trapping_problems *) get_opaque_ptr (opaque);
4821 struct gcpro gcpro1;
4822 Lisp_Object lstream = Qnil;
4823 Lisp_Object errstr;
4824 int speccount = specpdl_depth ();
4825 4819
4826 if (!(inhibit_flags & INHIBIT_WARNING_ISSUE) 4820 if (!(inhibit_flags & INHIBIT_WARNING_ISSUE)
4827 && !warning_will_be_discarded (current_warning_level ())) 4821 && !warning_will_be_discarded (current_warning_level ()))
4828 { 4822 {
4823 struct gcpro gcpro1;
4824 Lisp_Object lstream = Qnil;
4825 int speccount = specpdl_depth ();
4826
4829 /* We're no longer protected against errors or quit here, so at 4827 /* We're no longer protected against errors or quit here, so at
4830 least let's temporarily inhibit quit. We definitely do not 4828 least let's temporarily inhibit quit. We definitely do not
4831 want to inhibit quit during the calling of the function 4829 want to inhibit quit during the calling of the function
4832 itself!!!!!!!!!!! */ 4830 itself!!!!!!!!!!! */
4833 4831
4839 Lstream_flush (XLSTREAM (lstream)); 4837 Lstream_flush (XLSTREAM (lstream));
4840 p->backtrace = resizing_buffer_to_lisp_string (XLSTREAM (lstream)); 4838 p->backtrace = resizing_buffer_to_lisp_string (XLSTREAM (lstream));
4841 Lstream_delete (XLSTREAM (lstream)); 4839 Lstream_delete (XLSTREAM (lstream));
4842 UNGCPRO; 4840 UNGCPRO;
4843 4841
4844 /* #### This should call
4845 (with-output-to-string (display-error (cons error_conditions data))
4846 but that stuff is all in Lisp currently. */
4847 errstr =
4848 emacs_sprintf_string_lisp
4849 ("%s: (%s %s)\n\nBacktrace follows:\n\n%s",
4850 Qnil, 4,
4851 build_msg_string (p->warning_string ? p->warning_string : "error"),
4852 error_conditions, data, p->backtrace);
4853
4854 warn_when_safe_lispobj (p->warning_class, current_warning_level (),
4855 errstr);
4856
4857 unbind_to (speccount); 4842 unbind_to (speccount);
4858 } 4843 }
4859 else 4844 else
4860 p->backtrace = Qnil; 4845 p->backtrace = Qnil;
4861 4846
4878 static Lisp_Object 4863 static Lisp_Object
4879 call_trapping_problems_1 (Lisp_Object opaque) 4864 call_trapping_problems_1 (Lisp_Object opaque)
4880 { 4865 {
4881 return call_with_condition_handler (flagged_a_squirmer, opaque, 4866 return call_with_condition_handler (flagged_a_squirmer, opaque,
4882 call_trapping_problems_2, opaque); 4867 call_trapping_problems_2, opaque);
4868 }
4869
4870 static void
4871 issue_call_trapping_problems_warning (Lisp_Object warning_class,
4872 const CIbyte *warning_string,
4873 struct call_trapping_problems_result *p)
4874 {
4875 if (!warning_will_be_discarded (current_warning_level ()))
4876 {
4877 int depth = specpdl_depth ();
4878
4879 /* We're no longer protected against errors or quit here, so at
4880 least let's temporarily inhibit quit. */
4881 specbind (Qinhibit_quit, Qt);
4882
4883 if (p->caught_throw)
4884 {
4885 Lisp_Object errstr =
4886 emacs_sprintf_string_lisp
4887 ("%s: Attempt to throw outside of function "
4888 "to catch `%s' with value `%s'",
4889 Qnil, 3,
4890 build_msg_string (warning_string ? warning_string : "error"),
4891 p->thrown_tag, p->thrown_value);
4892 warn_when_safe_lispobj (Qerror, current_warning_level (), errstr);
4893 }
4894 else if (p->caught_error)
4895 {
4896 Lisp_Object errstr;
4897 /* #### This should call
4898 (with-output-to-string (display-error (cons error_conditions
4899 data))
4900 but that stuff is all in Lisp currently. */
4901 errstr =
4902 emacs_sprintf_string_lisp
4903 ("%s: (%s %s)\n\nBacktrace follows:\n\n%s",
4904 Qnil, 4,
4905 build_msg_string (warning_string ? warning_string : "error"),
4906 p->error_conditions, p->data, p->backtrace);
4907
4908 warn_when_safe_lispobj (warning_class, current_warning_level (),
4909 errstr);
4910 }
4911
4912 unbind_to (depth);
4913 }
4883 } 4914 }
4884 4915
4885 /* Turn on the trapping flags in FLAGS -- see call_trapping_problems(). 4916 /* Turn on the trapping flags in FLAGS -- see call_trapping_problems().
4886 This cannot handle INTERNAL_INHIBIT_THROWS() or INTERNAL_INHIBIT_ERRORS 4917 This cannot handle INTERNAL_INHIBIT_THROWS() or INTERNAL_INHIBIT_ERRORS
4887 (because they ultimately boil down to a setjmp()!) -- you must directly 4918 (because they ultimately boil down to a setjmp()!) -- you must directly
4941 `throw' out of the function being called are trapped, and a warning 4972 `throw' out of the function being called are trapped, and a warning
4942 issued. (Again, WARNING_STRING should be given.) 4973 issued. (Again, WARNING_STRING should be given.)
4943 4974
4944 (If FLAGS contains INHIBIT_WARNING_ISSUE, no warnings are issued; 4975 (If FLAGS contains INHIBIT_WARNING_ISSUE, no warnings are issued;
4945 this applies to recursive invocations of call_trapping_problems, too. 4976 this applies to recursive invocations of call_trapping_problems, too.
4977
4978 If FLAGS contains POSTPONE_WARNING_ISSUE, no warnings are issued;
4979 but values useful for generating a warning are still computed (in
4980 particular, the backtrace), so that the calling function can issue
4981 a warning.
4946 4982
4947 If FLAGS contains ISSUE_WARNINGS_AT_DEBUG_LEVEL, warnings will be 4983 If FLAGS contains ISSUE_WARNINGS_AT_DEBUG_LEVEL, warnings will be
4948 issued, but at level `debug', which normally is below the minimum 4984 issued, but at level `debug', which normally is below the minimum
4949 specified by `log-warning-minimum-level', meaning such warnings will 4985 specified by `log-warning-minimum-level', meaning such warnings will
4950 be ignored entirely. The user can change this variable, however, 4986 be ignored entirely. The user can change this variable, however,
5063 void *arg) 5099 void *arg)
5064 { 5100 {
5065 int speccount = specpdl_depth (); 5101 int speccount = specpdl_depth ();
5066 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; 5102 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
5067 struct call_trapping_problems package; 5103 struct call_trapping_problems package;
5104 struct call_trapping_problems_result real_problem;
5068 Lisp_Object opaque, thrown_tag, tem; 5105 Lisp_Object opaque, thrown_tag, tem;
5069 int thrown = 0; 5106 int thrown = 0;
5070 5107
5071 assert (SYMBOLP (warning_class)); /* sanity-check */ 5108 assert (SYMBOLP (warning_class)); /* sanity-check */
5072 assert (!NILP (warning_class)); 5109 assert (!NILP (warning_class));
5107 &thrown, &thrown_tag); 5144 &thrown, &thrown_tag);
5108 else 5145 else
5109 /* Nothing special. */ 5146 /* Nothing special. */
5110 tem = (fun) (arg); 5147 tem = (fun) (arg);
5111 5148
5112 if (thrown && !EQ (thrown_tag, package.catchtag) 5149 if (!problem)
5113 && !(flags & INHIBIT_WARNING_ISSUE) 5150 problem = &real_problem;
5114 && !warning_will_be_discarded (current_warning_level ())) 5151
5115 { 5152 if (!thrown)
5116 Lisp_Object errstr; 5153 {
5117 5154 problem->caught_error = 0;
5118 if (!(flags & INHIBIT_QUIT)) 5155 problem->caught_throw = 0;
5119 /* We're no longer protected against errors or quit here, so at 5156 problem->error_conditions = Qnil;
5120 least let's temporarily inhibit quit. */ 5157 problem->data = Qnil;
5121 specbind (Qinhibit_quit, Qt); 5158 problem->backtrace = Qnil;
5122 errstr = 5159 problem->thrown_tag = Qnil;
5123 emacs_sprintf_string_lisp 5160 problem->thrown_value = Qnil;
5124 ("%s: Attempt to throw outside of function " 5161 }
5125 "to catch `%s' with value `%s'", 5162 else if (EQ (thrown_tag, package.catchtag))
5126 Qnil, 3, build_msg_string (warning_string ? warning_string : "error"), 5163 {
5127 thrown_tag, tem); 5164 problem->caught_error = 1;
5128 5165 problem->caught_throw = 0;
5129 warn_when_safe_lispobj (Qerror, current_warning_level (), errstr); 5166 problem->error_conditions = package.error_conditions;
5130 } 5167 problem->data = package.data;
5131 5168 problem->backtrace = package.backtrace;
5132 if (problem) 5169 problem->thrown_tag = Qnil;
5133 { 5170 problem->thrown_value = Qnil;
5134 if (!thrown) 5171 }
5135 { 5172 else
5136 problem->caught_error = 0; 5173 {
5137 problem->caught_throw = 0; 5174 problem->caught_error = 0;
5138 problem->error_conditions = Qnil; 5175 problem->caught_throw = 1;
5139 problem->data = Qnil; 5176 problem->error_conditions = Qnil;
5140 problem->backtrace = Qnil; 5177 problem->data = Qnil;
5141 problem->thrown_tag = Qnil; 5178 problem->backtrace = Qnil;
5142 problem->thrown_value = Qnil; 5179 problem->thrown_tag = thrown_tag;
5143 } 5180 problem->thrown_value = tem;
5144 else if (EQ (thrown_tag, package.catchtag)) 5181 }
5145 { 5182
5146 problem->caught_error = 1; 5183 if (!(flags & INHIBIT_WARNING_ISSUE) && !(flags & POSTPONE_WARNING_ISSUE))
5147 problem->caught_throw = 0; 5184 issue_call_trapping_problems_warning (warning_class, warning_string,
5148 problem->error_conditions = package.error_conditions; 5185 problem);
5149 problem->data = package.data;
5150 problem->backtrace = package.backtrace;
5151 problem->thrown_tag = Qnil;
5152 problem->thrown_value = Qnil;
5153 }
5154 else
5155 {
5156 problem->caught_error = 0;
5157 problem->caught_throw = 1;
5158 problem->error_conditions = Qnil;
5159 problem->data = Qnil;
5160 problem->backtrace = Qnil;
5161 problem->thrown_tag = thrown_tag;
5162 problem->thrown_value = tem;
5163 }
5164 }
5165 5186
5166 if (!NILP (package.catchtag) && 5187 if (!NILP (package.catchtag) &&
5167 !EQ (package.catchtag, Vcatch_everything_tag)) 5188 !EQ (package.catchtag, Vcatch_everything_tag))
5168 free_opaque_ptr (package.catchtag); 5189 free_opaque_ptr (package.catchtag);
5169 5190
5470 eval_in_buffer_trapping_problems_1, 5491 eval_in_buffer_trapping_problems_1,
5471 &p)); 5492 &p));
5472 } 5493 }
5473 5494
5474 Lisp_Object 5495 Lisp_Object
5475 run_hook_trapping_problems (const CIbyte *warning_string, 5496 run_hook_trapping_problems (Lisp_Object warning_class,
5476 Lisp_Object hook_symbol, 5497 Lisp_Object hook_symbol,
5477 int flags) 5498 int flags)
5478 { 5499 {
5479 return run_hook_with_args_trapping_problems (warning_string, 1, &hook_symbol, 5500 return run_hook_with_args_trapping_problems (warning_class, 1, &hook_symbol,
5480 RUN_HOOKS_TO_COMPLETION, 5501 RUN_HOOKS_TO_COMPLETION,
5481 flags); 5502 flags);
5482 } 5503 }
5483 5504
5484 static Lisp_Object 5505 static Lisp_Object
5492 5513
5493 /* Same as run_hook_trapping_problems() but also set the hook to nil 5514 /* Same as run_hook_trapping_problems() but also set the hook to nil
5494 if an error occurs (but not a quit). */ 5515 if an error occurs (but not a quit). */
5495 5516
5496 Lisp_Object 5517 Lisp_Object
5497 safe_run_hook_trapping_problems (const CIbyte *warning_string, 5518 safe_run_hook_trapping_problems (Lisp_Object warning_class,
5498 Lisp_Object hook_symbol, 5519 Lisp_Object hook_symbol, int flags)
5499 int flags)
5500 { 5520 {
5501 Lisp_Object tem; 5521 Lisp_Object tem;
5502 struct gcpro gcpro1, gcpro2; 5522 struct gcpro gcpro1, gcpro2;
5503 struct call_trapping_problems_result prob; 5523 struct call_trapping_problems_result prob;
5504 5524
5507 tem = find_symbol_value (hook_symbol); 5527 tem = find_symbol_value (hook_symbol);
5508 if (NILP (tem) || UNBOUNDP (tem)) 5528 if (NILP (tem) || UNBOUNDP (tem))
5509 return Qnil; 5529 return Qnil;
5510 5530
5511 GCPRO2 (hook_symbol, tem); 5531 GCPRO2 (hook_symbol, tem);
5512 tem = call_trapping_problems (Qerror, warning_string, flags, 5532 tem = call_trapping_problems (Qerror, NULL,
5533 flags | POSTPONE_WARNING_ISSUE,
5513 &prob, 5534 &prob,
5514 safe_run_hook_trapping_problems_1, 5535 safe_run_hook_trapping_problems_1,
5515 LISP_TO_VOID (hook_symbol)); 5536 LISP_TO_VOID (hook_symbol));
5516 if (prob.caught_throw || (prob.caught_error && !EQ (prob.error_conditions, 5537 {
5517 Qquit))) 5538 Lisp_Object hook_name = XSYMBOL_NAME (hook_symbol);
5518 Fset (hook_symbol, Qnil); 5539 Ibyte *hook_str = XSTRING_DATA (hook_name);
5519 RETURN_UNGCPRO (tem); 5540 Ibyte *err = alloca_ibytes (XSTRING_LENGTH (hook_name) + 100);
5541
5542 if (prob.caught_throw || (prob.caught_error && !EQ (prob.error_conditions,
5543 Qquit)))
5544 {
5545 Fset (hook_symbol, Qnil);
5546 qxesprintf (err, "Error in `%s' (resetting to nil)", hook_str);
5547 }
5548 else
5549 qxesprintf (err, "Quit in `%s'", hook_str);
5550
5551
5552 issue_call_trapping_problems_warning (warning_class, (CIbyte *) err,
5553 &prob);
5554 }
5555
5556 UNGCPRO;
5557 return tem;
5520 } 5558 }
5521 5559
5522 struct run_hook_with_args_in_buffer_trapping_problems 5560 struct run_hook_with_args_in_buffer_trapping_problems
5523 { 5561 {
5524 struct buffer *buf; 5562 struct buffer *buf;
5539 5577
5540 /* #### fix these functions to follow the calling convention of 5578 /* #### fix these functions to follow the calling convention of
5541 call_trapping_problems! */ 5579 call_trapping_problems! */
5542 5580
5543 Lisp_Object 5581 Lisp_Object
5544 run_hook_with_args_in_buffer_trapping_problems (const CIbyte *warning_string, 5582 run_hook_with_args_in_buffer_trapping_problems (Lisp_Object warning_class,
5545 struct buffer *buf, int nargs, 5583 struct buffer *buf, int nargs,
5546 Lisp_Object *args, 5584 Lisp_Object *args,
5547 enum run_hooks_condition cond, 5585 enum run_hooks_condition cond,
5548 int flags) 5586 int flags)
5549 { 5587 {
5550 Lisp_Object sym, val, ret; 5588 Lisp_Object sym, val, ret;
5551 struct run_hook_with_args_in_buffer_trapping_problems diversity_and_distrust; 5589 struct run_hook_with_args_in_buffer_trapping_problems diversity_and_distrust;
5552 struct gcpro gcpro1; 5590 struct gcpro gcpro1;
5591 Lisp_Object hook_name;
5592 Ibyte *hook_str;
5593 Ibyte *err;
5553 5594
5554 if (!initialized || preparing_for_armageddon) 5595 if (!initialized || preparing_for_armageddon)
5555 /* We need to bail out of here pronto. */ 5596 /* We need to bail out of here pronto. */
5556 return Qnil; 5597 return Qnil;
5557 5598
5567 diversity_and_distrust.buf = buf; 5608 diversity_and_distrust.buf = buf;
5568 diversity_and_distrust.nargs = nargs; 5609 diversity_and_distrust.nargs = nargs;
5569 diversity_and_distrust.args = args; 5610 diversity_and_distrust.args = args;
5570 diversity_and_distrust.cond = cond; 5611 diversity_and_distrust.cond = cond;
5571 5612
5613 hook_name = XSYMBOL_NAME (args[0]);
5614 hook_str = XSTRING_DATA (hook_name);
5615 err = alloca_ibytes (XSTRING_LENGTH (hook_name) + 100);
5616 qxesprintf (err, "Error in `%s'", hook_str);
5572 RETURN_UNGCPRO 5617 RETURN_UNGCPRO
5573 (call_trapping_problems 5618 (call_trapping_problems
5574 (Qerror, warning_string, 5619 (warning_class, (CIbyte *) err, flags, 0,
5575 flags, 0,
5576 run_hook_with_args_in_buffer_trapping_problems_1, 5620 run_hook_with_args_in_buffer_trapping_problems_1,
5577 &diversity_and_distrust)); 5621 &diversity_and_distrust));
5578 } 5622 }
5579 5623
5580 Lisp_Object 5624 Lisp_Object
5581 run_hook_with_args_trapping_problems (const CIbyte *warning_string, 5625 run_hook_with_args_trapping_problems (Lisp_Object warning_class,
5582 int nargs, 5626 int nargs,
5583 Lisp_Object *args, 5627 Lisp_Object *args,
5584 enum run_hooks_condition cond, 5628 enum run_hooks_condition cond,
5585 int flags) 5629 int flags)
5586 { 5630 {
5587 return run_hook_with_args_in_buffer_trapping_problems 5631 return run_hook_with_args_in_buffer_trapping_problems
5588 (warning_string, current_buffer, nargs, args, cond, flags); 5632 (warning_class, current_buffer, nargs, args, cond, flags);
5589 } 5633 }
5590 5634
5591 Lisp_Object 5635 Lisp_Object
5592 va_run_hook_with_args_trapping_problems (const CIbyte *warning_string, 5636 va_run_hook_with_args_trapping_problems (Lisp_Object warning_class,
5593 Lisp_Object hook_var, 5637 Lisp_Object hook_var,
5594 int nargs, ...) 5638 int nargs, ...)
5595 { 5639 {
5596 /* This function can GC */ 5640 /* This function can GC */
5597 struct gcpro gcpro1; 5641 struct gcpro gcpro1;
5607 flags = va_arg (vargs, int); 5651 flags = va_arg (vargs, int);
5608 va_end (vargs); 5652 va_end (vargs);
5609 5653
5610 GCPRO1_ARRAY (funcall_args, nargs + 1); 5654 GCPRO1_ARRAY (funcall_args, nargs + 1);
5611 RETURN_UNGCPRO (run_hook_with_args_in_buffer_trapping_problems 5655 RETURN_UNGCPRO (run_hook_with_args_in_buffer_trapping_problems
5612 (warning_string, current_buffer, nargs + 1, funcall_args, 5656 (warning_class, current_buffer, nargs + 1, funcall_args,
5613 RUN_HOOKS_TO_COMPLETION, flags)); 5657 RUN_HOOKS_TO_COMPLETION, flags));
5614 } 5658 }
5615 5659
5616 Lisp_Object 5660 Lisp_Object
5617 va_run_hook_with_args_in_buffer_trapping_problems (const CIbyte * 5661 va_run_hook_with_args_in_buffer_trapping_problems (Lisp_Object warning_class,
5618 warning_string,
5619 struct buffer *buf, 5662 struct buffer *buf,
5620 Lisp_Object hook_var, 5663 Lisp_Object hook_var,
5621 int nargs, ...) 5664 int nargs, ...)
5622 { 5665 {
5623 /* This function can GC */ 5666 /* This function can GC */
5634 flags = va_arg (vargs, int); 5677 flags = va_arg (vargs, int);
5635 va_end (vargs); 5678 va_end (vargs);
5636 5679
5637 GCPRO1_ARRAY (funcall_args, nargs + 1); 5680 GCPRO1_ARRAY (funcall_args, nargs + 1);
5638 RETURN_UNGCPRO (run_hook_with_args_in_buffer_trapping_problems 5681 RETURN_UNGCPRO (run_hook_with_args_in_buffer_trapping_problems
5639 (warning_string, buf, nargs + 1, funcall_args, 5682 (warning_class, buf, nargs + 1, funcall_args,
5640 RUN_HOOKS_TO_COMPLETION, flags)); 5683 RUN_HOOKS_TO_COMPLETION, flags));
5641 } 5684 }
5642 5685
5643 5686
5644 /************************************************************************/ 5687 /************************************************************************/
5874 } 5917 }
5875 5918
5876 /* Establish an unwind-protect which will restore the int pointed to 5919 /* Establish an unwind-protect which will restore the int pointed to
5877 by ADDR with the value VAL. This function works correctly with 5920 by ADDR with the value VAL. This function works correctly with
5878 all ints, even those that don't fit into a Lisp integer. */ 5921 all ints, even those that don't fit into a Lisp integer. */
5879 static int 5922 int
5880 record_unwind_protect_restoring_int (int *addr, int val) 5923 record_unwind_protect_restoring_int (int *addr, int val)
5881 { 5924 {
5882 Lisp_Object opaque = make_opaque_ptr (addr); 5925 Lisp_Object opaque = make_opaque_ptr (addr);
5883 Lisp_Object lval; 5926 Lisp_Object lval;
5884 5927