summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c39
1 files changed, 28 insertions, 11 deletions
diff --git a/src/eval.c b/src/eval.c
index a867d00150e..a6c58bc2425 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -103,7 +103,7 @@ Lisp_Object Vrun_hooks;
/* Non-nil means record all fset's and provide's, to be undone
if the file being autoloaded is not fully loaded.
They are recorded by being consed onto the front of Vautoload_queue:
- (FUN . ODEF) for a defun, (OFEATURES . nil) for a provide. */
+ (FUN . ODEF) for a defun, (0 . OFEATURES) for a provide. */
Lisp_Object Vautoload_queue;
@@ -1343,15 +1343,28 @@ usage: (condition-case VAR BODYFORM &rest HANDLERS) */)
(args)
Lisp_Object args;
{
- Lisp_Object val;
- struct catchtag c;
- struct handler h;
register Lisp_Object bodyform, handlers;
volatile Lisp_Object var;
var = Fcar (args);
bodyform = Fcar (Fcdr (args));
handlers = Fcdr (Fcdr (args));
+
+ return internal_lisp_condition_case (var, bodyform, handlers);
+}
+
+/* Like Fcondition_case, but the args are separate
+ rather than passed in a list. Used by Fbyte_code. */
+
+Lisp_Object
+internal_lisp_condition_case (var, bodyform, handlers)
+ volatile Lisp_Object var;
+ Lisp_Object bodyform, handlers;
+{
+ Lisp_Object val;
+ struct catchtag c;
+ struct handler h;
+
CHECK_SYMBOL (var);
for (val = handlers; CONSP (val); val = XCDR (val))
@@ -2009,8 +2022,8 @@ un_autoload (oldqueue)
first = XCAR (queue);
second = Fcdr (first);
first = Fcar (first);
- if (EQ (second, Qnil))
- Vfeatures = first;
+ if (EQ (first, make_number (0)))
+ Vfeatures = second;
else
Ffset (first, second);
queue = XCDR (queue);
@@ -2056,7 +2069,7 @@ do_autoload (fundef, funname)
second = Fcdr (first);
first = Fcar (first);
- if (CONSP (second) && EQ (XCAR (second), Qautoload))
+ if (SYMBOLP (first) && CONSP (second) && EQ (XCAR (second), Qautoload))
Fput (first, Qautoload, (XCDR (second)));
queue = XCDR (queue);
@@ -2094,8 +2107,10 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
return form;
QUIT;
- if (consing_since_gc > gc_cons_threshold
- && consing_since_gc > gc_relative_threshold)
+ if ((consing_since_gc > gc_cons_threshold
+ && consing_since_gc > gc_relative_threshold)
+ ||
+ (!NILP (Vmemory_full) && consing_since_gc > memory_full_cons_threshold))
{
GCPRO1 (form);
Fgarbage_collect ();
@@ -2795,8 +2810,10 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
register int i;
QUIT;
- if (consing_since_gc > gc_cons_threshold
- && consing_since_gc > gc_relative_threshold)
+ if ((consing_since_gc > gc_cons_threshold
+ && consing_since_gc > gc_relative_threshold)
+ ||
+ (!NILP (Vmemory_full) && consing_since_gc > memory_full_cons_threshold))
Fgarbage_collect ();
if (++lisp_eval_depth > max_lisp_eval_depth)