comparison src/eval.c @ 793:e38acbeb1cae

[xemacs-hg @ 2002-03-29 04:46:17 by ben] lots o' fixes etc/ChangeLog: New file. Separated out all entries for etc/ into their own ChangeLog. Includes entries for the following files: etc/BABYL, etc/BETA, etc/CHARSETS, etc/DISTRIB, etc/Emacs.ad, etc/FTP, etc/GNUS-NEWS, etc/GOATS, etc/HELLO, etc/INSTALL, etc/MACHINES, etc/MAILINGLISTS, etc/MSDOS, etc/MYTHOLOGY, etc/NEWS, etc/OXYMORONS, etc/PACKAGES, etc/README, etc/TUTORIAL, etc/TUTORIAL.de, etc/TUTORIAL.ja, etc/TUTORIAL.ko, etc/TUTORIAL.se, etc/aliases.ksh, etc/altrasoft-logo.xpm, etc/check_cygwin_setup.sh, etc/custom/example-themes/europe-theme.el, etc/custom/example-themes/ex-custom-file, etc/custom/example-themes/example-theme.el, etc/e/eterm.ti, etc/edt-user.doc, etc/enriched.doc, etc/etags.1, etc/gnuserv.1, etc/gnuserv.README, etc/package-index.LATEST.gpg, etc/package-index.LATEST.pgp, etc/photos/jan.png, etc/recycle.xpm, etc/refcard.tex, etc/sample.Xdefaults, etc/sample.emacs, etc/sgml/CATALOG, etc/sgml/HTML32.dtd, etc/skk/SKK.tut.E, etc/smilies/Face_ase.xbm, etc/smilies/Face_ase2.xbm, etc/smilies/Face_ase3.xbm, etc/smilies/Face_smile.xbm, etc/smilies/Face_weep.xbm, etc/sounds, etc/toolbar, etc/toolbar/workshop-cap-up.xpm, etc/xemacs-ja.1, etc/xemacs.1, etc/yow.lines, etc\BETA, etc\NEWS, etc\README, etc\TUTORIAL, etc\TUTORIAL.de, etc\check_cygwin_setup.sh, etc\sample.init.el, etc\unicode\README, etc\unicode\mule-ucs\*, etc\unicode\other\* unicode/unicode-consortium/8859-16.TXT: New file. mule/english.el: Define this charset now, since a bug was fixed that formerly prevented it. mule/ethio-util.el: Fix compile errors involving Unicode `characters', which should be integers. Makefile.in.in: Always include gui.c, to fix compile error when TTY-only. EmacsFrame.c, abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, bytecode.h, callint.c, callproc.c, casetab.c, casetab.h, charset.h, chartab.c, chartab.h, cmds.c, console-msw.c, console-msw.h, console-tty.c, console-x.c, console-x.h, console.c, console.h, data.c, database.c, device-gtk.c, device-msw.c, device-x.c, device.c, device.h, dialog-msw.c, doc.c, doprnt.c, dumper.c, dynarr.c, editfns.c, eldap.c, eldap.h, elhash.c, elhash.h, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-tty.c, event-unixoid.c, events.c, events.h, extents.c, extents.h, faces.c, faces.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, frame-gtk.c, frame-msw.c, frame-tty.c, frame-x.c, frame.c, frame.h, free-hook.c, general-slots.h, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-widget.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gtk-xemacs.c, gui-msw.c, gui-x.c, gui-x.h, gui.c, gui.h, gutter.c, gutter.h, indent.c, input-method-xlib.c, insdel.c, keymap.c, keymap.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, marker.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-canna.c, mule-ccl.c, mule-charset.c, mule-wnnfns.c, native-gtk-toolbar.c, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, opaque.c, opaque.h, postgresql.c, postgresql.h, print.c, process-unix.c, process.c, process.h, rangetab.c, rangetab.h, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, scrollbar-gtk.c, scrollbar-msw.c, scrollbar-x.c, scrollbar.c, scrollbar.h, search.c, select-gtk.c, select-x.c, sound.c, specifier.c, specifier.h, strftime.c, symbols.c, symeval.h, syntax.h, text.c, text.h, toolbar-common.c, toolbar-msw.c, toolbar.c, toolbar.h, tooltalk.c, tooltalk.h, ui-gtk.c, ui-gtk.h, undo.c, vm-limit.c, window.c, window.h: Eliminate XSETFOO. Replace all usages with wrap_foo(). Make symbol->name a Lisp_Object, not Lisp_String *. Eliminate nearly all uses of Lisp_String * in favor of Lisp_Object, and correct macros so most of them favor Lisp_Object. Create new error-behavior ERROR_ME_DEBUG_WARN -- output warnings, but at level `debug' (usually ignored). Use it when instantiating specifiers, so problems can be debugged. Move log-warning-minimum-level into C so that we can optimize ERROR_ME_DEBUG_WARN. Fix warning levels consistent with new definitions. Add default_ and parent fields to char table; not yet implemented. New fun Dynarr_verify(); use for further error checking on Dynarrs. Rearrange code at top of lisp.h in conjunction with dynarr changes. Fix eifree(). Use Eistrings in various places (format_event_object(), where_is_to_char(), and callers thereof) to avoid fixed-size strings buffers. New fun write_eistring(). Reindent and fix GPM code to follow standards. Set default MS Windows font to Lucida Console (same size as Courier New but less interline spacing, so more lines fit). Increase default frame size on Windows to 50 lines. (If that's too big for the workspace, the frame will be shrunk as necessary.) Fix problem with text files with no newlines (). (Change `convert-eol' coding system to use `nil' for autodetect, consistent with make-coding-system.) Correct compile warnings in vm-limit.c. Fix handling of reverse-direction charsets to avoid errors when opening (e.g.) mule-ucs/lisp/reldata/uiso8859-6.el. Recode some object printing methods to use write_fmt_string() instead of a fixed buffer and sprintf. Turn on display of png comments as warnings (level `info'), now that they're unobtrusive. Revamped the sound documentation. Fixed bug in redisplay w.r.t. hscroll/truncation/continuation glyphs causing jumping up and down of the lines, since they're bigger than the line size. (It was seen most obviously when there's a horizontal scroll bar, e.g. do C-h a glyph or something like that.) The problem was that the glyph-contrib-p setting on glyphs was ignored even if it was set properly, which it wasn't until now.
author ben
date Fri, 29 Mar 2002 04:49:13 +0000
parents 943eaba38521
children a5954632b187
comparison
equal deleted inserted replaced
792:4e83fdb13eb9 793:e38acbeb1cae
1 /* Evaluator for XEmacs Lisp interpreter. 1 /* Evaluator for XEmacs Lisp interpreter.
2 Copyright (C) 1985-1987, 1992-1994 Free Software Foundation, Inc. 2 Copyright (C) 1985-1987, 1992-1994 Free Software Foundation, Inc.
3 Copyright (C) 1995 Sun Microsystems, Inc. 3 Copyright (C) 1995 Sun Microsystems, Inc.
4 Copyright (C) 2000, 2001 Ben Wing. 4 Copyright (C) 2000, 2001, 2002 Ben Wing.
5 5
6 This file is part of XEmacs. 6 This file is part of XEmacs.
7 7
8 XEmacs is free software; you can redistribute it and/or modify it 8 XEmacs is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the 9 under the terms of the GNU General Public License as published by the
139 /* Current warning class when warnings occur, or nil for no warnings. 139 /* Current warning class when warnings occur, or nil for no warnings.
140 Only meaningful when Vcurrent_error_state is non-nil. 140 Only meaningful when Vcurrent_error_state is non-nil.
141 See call_with_suspended_errors(). */ 141 See call_with_suspended_errors(). */
142 Lisp_Object Vcurrent_warning_class; 142 Lisp_Object Vcurrent_warning_class;
143 143
144 /* Current warning level when warnings occur, or nil for no warnings.
145 Only meaningful when Vcurrent_error_state is non-nil.
146 See call_with_suspended_errors(). */
147 Lisp_Object Vcurrent_warning_level;
148
149 /* Minimum level at which warnings are logged. Below this, they're ignored
150 entirely -- not even generated. */
151 Lisp_Object Vlog_warning_minimum_level;
152
144 /* Special catch tag used in call_with_suspended_errors(). */ 153 /* Special catch tag used in call_with_suspended_errors(). */
145 Lisp_Object Qunbound_suspended_errors_tag; 154 Lisp_Object Qunbound_suspended_errors_tag;
146 155
147 /* Non-nil means record all fset's and provide's, to be undone 156 /* Non-nil means record all fset's and provide's, to be undone
148 if the file being autoloaded is not fully loaded. 157 if the file being autoloaded is not fully loaded.
1168 1177
1169 return 1178 return
1170 ((INTP (documentation) && XINT (documentation) < 0) || 1179 ((INTP (documentation) && XINT (documentation) < 0) ||
1171 1180
1172 (STRINGP (documentation) && 1181 (STRINGP (documentation) &&
1173 (string_byte (XSTRING (documentation), 0) == '*')) || 1182 (XSTRING_BYTE (documentation, 0) == '*')) ||
1174 1183
1175 /* If (STRING . INTEGER), a negative integer means a user variable. */ 1184 /* If (STRING . INTEGER), a negative integer means a user variable. */
1176 (CONSP (documentation) 1185 (CONSP (documentation)
1177 && STRINGP (XCAR (documentation)) 1186 && STRINGP (XCAR (documentation))
1178 && INTP (XCDR (documentation)) 1187 && INTP (XCDR (documentation))
1420 Lisp_Object sig, Lisp_Object data) 1429 Lisp_Object sig, Lisp_Object data)
1421 { 1430 {
1422 #ifdef DEFEND_AGAINST_THROW_RECURSION 1431 #ifdef DEFEND_AGAINST_THROW_RECURSION
1423 /* die if we recurse more than is reasonable */ 1432 /* die if we recurse more than is reasonable */
1424 if (++throw_level > 20) 1433 if (++throw_level > 20)
1425 abort(); 1434 abort ();
1426 #endif 1435 #endif
1427 1436
1428 /* If bomb_out_p is t, this is being called from Fsignal as a 1437 /* If bomb_out_p is t, this is being called from Fsignal as a
1429 "last resort" when there is no handler for this error and 1438 "last resort" when there is no handler for this error and
1430 the debugger couldn't be invoked, so we are throwing to 1439 the debugger couldn't be invoked, so we are throwing to
2101 struct gcpro gcpro1; 2110 struct gcpro gcpro1;
2102 2111
2103 GCPRO1 (data); 2112 GCPRO1 (data);
2104 if (!NILP (Vcurrent_error_state)) 2113 if (!NILP (Vcurrent_error_state))
2105 { 2114 {
2106 if (!NILP (Vcurrent_warning_class)) 2115 if (!NILP (Vcurrent_warning_class) && !NILP (Vcurrent_warning_level))
2107 warn_when_safe_lispobj (Vcurrent_warning_class, Qwarning, 2116 warn_when_safe_lispobj (Vcurrent_warning_class, Vcurrent_warning_level,
2108 Fcons (error_symbol, data)); 2117 Fcons (error_symbol, data));
2109 Fthrow (Qunbound_suspended_errors_tag, Qnil); 2118 Fthrow (Qunbound_suspended_errors_tag, Qnil);
2110 abort (); /* Better not get here! */ 2119 abort (); /* Better not get here! */
2111 } 2120 }
2112 RETURN_UNGCPRO (signal_1 (error_symbol, data)); 2121 RETURN_UNGCPRO (signal_1 (error_symbol, data));
2146 Vcurrent_warning_class = warning_class; 2155 Vcurrent_warning_class = warning_class;
2147 return Qnil; 2156 return Qnil;
2148 } 2157 }
2149 2158
2150 static Lisp_Object 2159 static Lisp_Object
2160 restore_current_warning_level (Lisp_Object warning_level)
2161 {
2162 Vcurrent_warning_level = warning_level;
2163 return Qnil;
2164 }
2165
2166 static Lisp_Object
2151 restore_current_error_state (Lisp_Object error_state) 2167 restore_current_error_state (Lisp_Object error_state)
2152 { 2168 {
2153 Vcurrent_error_state = error_state; 2169 Vcurrent_error_state = error_state;
2154 return Qnil; 2170 return Qnil;
2155 } 2171 }
2157 static Lisp_Object 2173 static Lisp_Object
2158 call_with_suspended_errors_1 (Lisp_Object opaque_arg) 2174 call_with_suspended_errors_1 (Lisp_Object opaque_arg)
2159 { 2175 {
2160 Lisp_Object val; 2176 Lisp_Object val;
2161 Lisp_Object *kludgy_args = (Lisp_Object *) get_opaque_ptr (opaque_arg); 2177 Lisp_Object *kludgy_args = (Lisp_Object *) get_opaque_ptr (opaque_arg);
2162 Lisp_Object no_error = kludgy_args[2];
2163 int speccount = specpdl_depth (); 2178 int speccount = specpdl_depth ();
2164 2179
2165 if (!EQ (Vcurrent_error_state, no_error)) 2180 if (NILP (Vcurrent_error_state))
2166 { 2181 {
2167 record_unwind_protect (restore_current_error_state, 2182 record_unwind_protect (restore_current_error_state,
2168 Vcurrent_error_state); 2183 Vcurrent_error_state);
2169 Vcurrent_error_state = no_error; 2184 Vcurrent_error_state = Qt;
2170 } 2185 }
2171 PRIMITIVE_FUNCALL (val, get_opaque_ptr (kludgy_args[0]), 2186 PRIMITIVE_FUNCALL (val, get_opaque_ptr (kludgy_args[0]),
2172 kludgy_args + 3, XINT (kludgy_args[1])); 2187 kludgy_args + 2, XINT (kludgy_args[1]));
2173 return unbind_to_1 (speccount, val); 2188 return unbind_to_1 (speccount, val);
2174 } 2189 }
2175 2190
2176 /* Many functions would like to do one of three things if an error 2191 /* Many functions would like to do one of three things if an error
2177 occurs: 2192 occurs:
2193 Lisp_Object class, Error_Behavior errb, 2208 Lisp_Object class, Error_Behavior errb,
2194 int nargs, ...) 2209 int nargs, ...)
2195 { 2210 {
2196 va_list vargs; 2211 va_list vargs;
2197 int speccount; 2212 int speccount;
2198 Lisp_Object kludgy_args[23]; 2213 Lisp_Object kludgy_args[22];
2199 Lisp_Object *args = kludgy_args + 3; 2214 Lisp_Object *args = kludgy_args + 2;
2200 int i; 2215 int i;
2201 Lisp_Object no_error;
2202 2216
2203 assert (SYMBOLP (class)); /* sanity-check */ 2217 assert (SYMBOLP (class)); /* sanity-check */
2204 assert (!NILP (class)); 2218 assert (!NILP (class));
2205 assert (nargs >= 0 && nargs < 20); 2219 assert (nargs >= 0 && nargs < 20);
2206
2207 /* ERROR_ME means don't trap errors. (However, if errors are
2208 already trapped, we leave them trapped.)
2209
2210 Otherwise, we trap errors, and trap warnings if ERROR_ME_WARN.
2211
2212 If ERROR_ME_NOT, it causes no warnings even if warnings
2213 were previously enabled. However, we never change the
2214 warning class from one to another. */
2215 if (!ERRB_EQ (errb, ERROR_ME))
2216 {
2217 if (ERRB_EQ (errb, ERROR_ME_NOT)) /* person wants no warnings */
2218 class = Qnil;
2219 errb = ERROR_ME_NOT;
2220 no_error = Qt;
2221 }
2222 else
2223 no_error = Qnil;
2224 2220
2225 va_start (vargs, nargs); 2221 va_start (vargs, nargs);
2226 for (i = 0; i < nargs; i++) 2222 for (i = 0; i < nargs; i++)
2227 args[i] = va_arg (vargs, Lisp_Object); 2223 args[i] = va_arg (vargs, Lisp_Object);
2228 va_end (vargs); 2224 va_end (vargs);
2229 2225
2226 /* ERROR_ME means don't trap errors. (However, if errors are
2227 already trapped, we leave them trapped.)
2228
2229 Otherwise, we trap errors, and display as warnings if ERROR_ME_WARN.
2230
2231 If ERROR_ME_NOT, we silently fail.
2232
2233 If ERROR_ME_DEBUG_WARN, we display a warning, but at warning level to
2234 `debug'. Normally these disappear, but can be seen if we changed
2235 log-warning-minimum-level.
2236 */
2237
2230 /* If error-checking is not disabled, just call the function. 2238 /* If error-checking is not disabled, just call the function.
2231 It's important not to override disabled error-checking with 2239 It's important not to override disabled error-checking with
2232 enabled error-checking. */ 2240 enabled error-checking. */
2233 2241
2234 if (ERRB_EQ (errb, ERROR_ME)) 2242 if (ERRB_EQ (errb, ERROR_ME))
2237 PRIMITIVE_FUNCALL (val, fun, args, nargs); 2245 PRIMITIVE_FUNCALL (val, fun, args, nargs);
2238 return val; 2246 return val;
2239 } 2247 }
2240 2248
2241 speccount = specpdl_depth (); 2249 speccount = specpdl_depth ();
2242 if (NILP (class) || NILP (Vcurrent_warning_class)) 2250 if (NILP (Vcurrent_warning_class))
2243 { 2251 {
2244 /* If we're currently calling for no warnings, then make it so. 2252 /* Don't change the existing class.
2245 If we're currently calling for warnings and we weren't 2253 #### Should we be consing the two together? */
2246 previously, then set our warning class; otherwise, leave
2247 the existing one alone. */
2248 record_unwind_protect (restore_current_warning_class, 2254 record_unwind_protect (restore_current_warning_class,
2249 Vcurrent_warning_class); 2255 Vcurrent_warning_class);
2250 Vcurrent_warning_class = class; 2256 Vcurrent_warning_class = class;
2251 } 2257 }
2258
2259 record_unwind_protect (restore_current_warning_level,
2260 Vcurrent_warning_level);
2261 Vcurrent_warning_level =
2262 (ERRB_EQ (errb, ERROR_ME_NOT) ? Qnil :
2263 ERRB_EQ (errb, ERROR_ME_DEBUG_WARN) ? Qdebug :
2264 Qwarning);
2265
2252 2266
2253 { 2267 {
2254 int threw; 2268 int threw;
2255 Lisp_Object the_retval; 2269 Lisp_Object the_retval;
2256 Lisp_Object opaque1 = make_opaque_ptr (kludgy_args); 2270 Lisp_Object opaque1 = make_opaque_ptr (kludgy_args);
2258 struct gcpro gcpro1, gcpro2; 2272 struct gcpro gcpro1, gcpro2;
2259 2273
2260 GCPRO2 (opaque1, opaque2); 2274 GCPRO2 (opaque1, opaque2);
2261 kludgy_args[0] = opaque2; 2275 kludgy_args[0] = opaque2;
2262 kludgy_args[1] = make_int (nargs); 2276 kludgy_args[1] = make_int (nargs);
2263 kludgy_args[2] = no_error;
2264 the_retval = internal_catch (Qunbound_suspended_errors_tag, 2277 the_retval = internal_catch (Qunbound_suspended_errors_tag,
2265 call_with_suspended_errors_1, 2278 call_with_suspended_errors_1,
2266 opaque1, &threw); 2279 opaque1, &threw);
2267 free_opaque_ptr (opaque1); 2280 free_opaque_ptr (opaque1);
2268 free_opaque_ptr (opaque2); 2281 free_opaque_ptr (opaque2);
2284 maybe_signal_error_1 (Lisp_Object sig, Lisp_Object data, Lisp_Object class, 2297 maybe_signal_error_1 (Lisp_Object sig, Lisp_Object data, Lisp_Object class,
2285 Error_Behavior errb) 2298 Error_Behavior errb)
2286 { 2299 {
2287 if (ERRB_EQ (errb, ERROR_ME_NOT)) 2300 if (ERRB_EQ (errb, ERROR_ME_NOT))
2288 return; 2301 return;
2302 else if (ERRB_EQ (errb, ERROR_ME_DEBUG_WARN))
2303 warn_when_safe_lispobj (class, Qdebug, Fcons (sig, data));
2289 else if (ERRB_EQ (errb, ERROR_ME_WARN)) 2304 else if (ERRB_EQ (errb, ERROR_ME_WARN))
2290 warn_when_safe_lispobj (class, Qwarning, Fcons (sig, data)); 2305 warn_when_safe_lispobj (class, Qwarning, Fcons (sig, data));
2291 else 2306 else
2292 for (;;) 2307 for (;;)
2293 Fsignal (sig, data); 2308 Fsignal (sig, data);
2300 maybe_signal_continuable_error_1 (Lisp_Object sig, Lisp_Object data, 2315 maybe_signal_continuable_error_1 (Lisp_Object sig, Lisp_Object data,
2301 Lisp_Object class, Error_Behavior errb) 2316 Lisp_Object class, Error_Behavior errb)
2302 { 2317 {
2303 if (ERRB_EQ (errb, ERROR_ME_NOT)) 2318 if (ERRB_EQ (errb, ERROR_ME_NOT))
2304 return Qnil; 2319 return Qnil;
2320 else if (ERRB_EQ (errb, ERROR_ME_DEBUG_WARN))
2321 {
2322 warn_when_safe_lispobj (class, Qdebug, Fcons (sig, data));
2323 return Qnil;
2324 }
2305 else if (ERRB_EQ (errb, ERROR_ME_WARN)) 2325 else if (ERRB_EQ (errb, ERROR_ME_WARN))
2306 { 2326 {
2307 warn_when_safe_lispobj (class, Qwarning, Fcons (sig, data)); 2327 warn_when_safe_lispobj (class, Qwarning, Fcons (sig, data));
2308 return Qnil; 2328 return Qnil;
2309 } 2329 }
4500 Lisp_Object buffer; 4520 Lisp_Object buffer;
4501 Lisp_Object cons; 4521 Lisp_Object cons;
4502 Lisp_Object opaque; 4522 Lisp_Object opaque;
4503 struct gcpro gcpro1, gcpro2; 4523 struct gcpro gcpro1, gcpro2;
4504 4524
4505 XSETBUFFER (buffer, buf); 4525 buffer = wrap_buffer (buf);
4506 4526
4507 specbind (Qinhibit_quit, Qt); 4527 specbind (Qinhibit_quit, Qt);
4508 /* begin_gc_forbidden(); Currently no reason to do this; */ 4528 /* begin_gc_forbidden(); Currently no reason to do this; */
4509 4529
4510 cons = noseeum_cons (buffer, form); 4530 cons = noseeum_cons (buffer, form);
5265 5285
5266 void 5286 void
5267 warn_when_safe_lispobj (Lisp_Object class, Lisp_Object level, 5287 warn_when_safe_lispobj (Lisp_Object class, Lisp_Object level,
5268 Lisp_Object obj) 5288 Lisp_Object obj)
5269 { 5289 {
5290 /* Don't even generate debug warnings if they're going to be discarded,
5291 to avoid excessive consing. */
5292 if (EQ (level, Qdebug) && !NILP (Vlog_warning_minimum_level) &&
5293 !EQ (Vlog_warning_minimum_level, Qdebug))
5294 return;
5295
5270 obj = list1 (list3 (class, level, obj)); 5296 obj = list1 (list3 (class, level, obj));
5271 if (NILP (Vpending_warnings)) 5297 if (NILP (Vpending_warnings))
5272 Vpending_warnings = Vpending_warnings_tail = obj; 5298 Vpending_warnings = Vpending_warnings_tail = obj;
5273 else 5299 else
5274 { 5300 {
5288 warn_when_safe (Lisp_Object class, Lisp_Object level, const CIntbyte *fmt, ...) 5314 warn_when_safe (Lisp_Object class, Lisp_Object level, const CIntbyte *fmt, ...)
5289 { 5315 {
5290 Lisp_Object obj; 5316 Lisp_Object obj;
5291 va_list args; 5317 va_list args;
5292 5318
5319 /* Don't even generate debug warnings if they're going to be discarded,
5320 to avoid excessive consing. */
5321 if (EQ (level, Qdebug) && !NILP (Vlog_warning_minimum_level) &&
5322 !EQ (Vlog_warning_minimum_level, Qdebug))
5323 return;
5324
5293 va_start (args, fmt); 5325 va_start (args, fmt);
5294 obj = emacs_vsprintf_string (CGETTEXT (fmt), args); 5326 obj = emacs_vsprintf_string (CGETTEXT (fmt), args);
5295 va_end (args); 5327 va_end (args);
5296 5328
5297 warn_when_safe_lispobj (class, level, obj); 5329 warn_when_safe_lispobj (class, level, obj);
5527 staticpro (&Vpending_warnings); 5559 staticpro (&Vpending_warnings);
5528 Vpending_warnings = Qnil; 5560 Vpending_warnings = Qnil;
5529 dump_add_root_object (&Vpending_warnings_tail); 5561 dump_add_root_object (&Vpending_warnings_tail);
5530 Vpending_warnings_tail = Qnil; 5562 Vpending_warnings_tail = Qnil;
5531 5563
5564 DEFVAR_LISP ("log-warning-minimum-level", &Vlog_warning_minimum_level);
5565 Vlog_warning_minimum_level = Qinfo;
5566
5532 staticpro (&Vautoload_queue); 5567 staticpro (&Vautoload_queue);
5533 Vautoload_queue = Qnil; 5568 Vautoload_queue = Qnil;
5534 5569
5535 staticpro (&Vcondition_handlers); 5570 staticpro (&Vcondition_handlers);
5536 5571
5537 staticpro (&Vcurrent_warning_class); 5572 staticpro (&Vcurrent_warning_class);
5538 Vcurrent_warning_class = Qnil; 5573 Vcurrent_warning_class = Qnil;
5539 5574
5575 staticpro (&Vcurrent_warning_level);
5576 Vcurrent_warning_level = Qnil;
5577
5540 staticpro (&Vcurrent_error_state); 5578 staticpro (&Vcurrent_error_state);
5541 Vcurrent_error_state = Qnil; /* errors as normal */ 5579 Vcurrent_error_state = Qnil; /* errors as normal */
5542 } 5580 }