aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorKen Raeburn1999-09-13 02:23:04 +0000
committerKen Raeburn1999-09-13 02:23:04 +0000
commit03699b140e13aee5b49fa4678e97dff5855e789c (patch)
tree79213225b326eeaa5385bf863f2e3c2df62963e5 /src/eval.c
parent926106201f8bfebbaac3c5b0f5e36192b7f00f1b (diff)
downloademacs-03699b140e13aee5b49fa4678e97dff5855e789c.tar.gz
emacs-03699b140e13aee5b49fa4678e97dff5855e789c.zip
Use XCAR, XCDR, and XFLOAT_DATA instead of explicit member access.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/eval.c b/src/eval.c
index b7e29f068c9..7052bec2586 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -322,11 +322,11 @@ CONDITION's value if non-nil is returned from the cond-form.")
322 val = Feval (Fcar (clause)); 322 val = Feval (Fcar (clause));
323 if (!NILP (val)) 323 if (!NILP (val))
324 { 324 {
325 if (!EQ (XCONS (clause)->cdr, Qnil)) 325 if (!EQ (XCDR (clause), Qnil))
326 val = Fprogn (XCONS (clause)->cdr); 326 val = Fprogn (XCDR (clause));
327 break; 327 break;
328 } 328 }
329 args = XCONS (args)->cdr; 329 args = XCDR (args);
330 } 330 }
331 UNGCPRO; 331 UNGCPRO;
332 332
@@ -670,9 +670,9 @@ for the variable is `*'.")
670 return Qt; 670 return Qt;
671 /* If it is (STRING . INTEGER), a negative integer means a user variable. */ 671 /* If it is (STRING . INTEGER), a negative integer means a user variable. */
672 if (CONSP (documentation) 672 if (CONSP (documentation)
673 && STRINGP (XCONS (documentation)->car) 673 && STRINGP (XCAR (documentation))
674 && INTEGERP (XCONS (documentation)->cdr) 674 && INTEGERP (XCDR (documentation))
675 && XINT (XCONS (documentation)->cdr) < 0) 675 && XINT (XCDR (documentation)) < 0)
676 return Qt; 676 return Qt;
677 return Qnil; 677 return Qnil;
678} 678}
@@ -818,7 +818,7 @@ definitions to shadow the loaded ones for use in file byte-compilation.")
818 if (!CONSP (form)) 818 if (!CONSP (form))
819 break; 819 break;
820 /* Set SYM, give DEF and TEM right values in case SYM is not a symbol. */ 820 /* Set SYM, give DEF and TEM right values in case SYM is not a symbol. */
821 def = sym = XCONS (form)->car; 821 def = sym = XCAR (form);
822 tem = Qnil; 822 tem = Qnil;
823 /* Trace symbols aliases to other symbols 823 /* Trace symbols aliases to other symbols
824 until we get a symbol that is not an alias. */ 824 until we get a symbol that is not an alias. */
@@ -844,7 +844,7 @@ definitions to shadow the loaded ones for use in file byte-compilation.")
844 if (EQ (def, Qunbound) || !CONSP (def)) 844 if (EQ (def, Qunbound) || !CONSP (def))
845 /* Not defined or definition not suitable */ 845 /* Not defined or definition not suitable */
846 break; 846 break;
847 if (EQ (XCONS (def)->car, Qautoload)) 847 if (EQ (XCAR (def), Qautoload))
848 { 848 {
849 /* Autoloading function: will it be a macro when loaded? */ 849 /* Autoloading function: will it be a macro when loaded? */
850 tem = Fnth (make_number (4), def); 850 tem = Fnth (make_number (4), def);
@@ -860,17 +860,17 @@ definitions to shadow the loaded ones for use in file byte-compilation.")
860 else 860 else
861 break; 861 break;
862 } 862 }
863 else if (!EQ (XCONS (def)->car, Qmacro)) 863 else if (!EQ (XCAR (def), Qmacro))
864 break; 864 break;
865 else expander = XCONS (def)->cdr; 865 else expander = XCDR (def);
866 } 866 }
867 else 867 else
868 { 868 {
869 expander = XCONS (tem)->cdr; 869 expander = XCDR (tem);
870 if (NILP (expander)) 870 if (NILP (expander))
871 break; 871 break;
872 } 872 }
873 form = apply1 (expander, XCONS (form)->cdr); 873 form = apply1 (expander, XCDR (form));
874 } 874 }
875 return form; 875 return form;
876} 876}
@@ -1062,8 +1062,8 @@ See also the function `signal' for more info.")
1062 tem = Fcar (val); 1062 tem = Fcar (val);
1063 if (! (NILP (tem) 1063 if (! (NILP (tem)
1064 || (CONSP (tem) 1064 || (CONSP (tem)
1065 && (SYMBOLP (XCONS (tem)->car) 1065 && (SYMBOLP (XCAR (tem))
1066 || CONSP (XCONS (tem)->car))))) 1066 || CONSP (XCAR (tem))))))
1067 error ("Invalid condition handler", tem); 1067 error ("Invalid condition handler", tem);
1068 } 1068 }
1069 1069
@@ -1311,11 +1311,11 @@ wants_debugger (list, conditions)
1311 while (CONSP (conditions)) 1311 while (CONSP (conditions))
1312 { 1312 {
1313 Lisp_Object this, tail; 1313 Lisp_Object this, tail;
1314 this = XCONS (conditions)->car; 1314 this = XCAR (conditions);
1315 for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr) 1315 for (tail = list; CONSP (tail); tail = XCDR (tail))
1316 if (EQ (XCONS (tail)->car, this)) 1316 if (EQ (XCAR (tail), this))
1317 return 1; 1317 return 1;
1318 conditions = XCONS (conditions)->cdr; 1318 conditions = XCDR (conditions);
1319 } 1319 }
1320 return 0; 1320 return 0;
1321} 1321}
@@ -1333,16 +1333,16 @@ skip_debugger (conditions, data)
1333 Lisp_Object error_message; 1333 Lisp_Object error_message;
1334 1334
1335 for (tail = Vdebug_ignored_errors; CONSP (tail); 1335 for (tail = Vdebug_ignored_errors; CONSP (tail);
1336 tail = XCONS (tail)->cdr) 1336 tail = XCDR (tail))
1337 { 1337 {
1338 if (STRINGP (XCONS (tail)->car)) 1338 if (STRINGP (XCAR (tail)))
1339 { 1339 {
1340 if (first_string) 1340 if (first_string)
1341 { 1341 {
1342 error_message = Ferror_message_string (data); 1342 error_message = Ferror_message_string (data);
1343 first_string = 0; 1343 first_string = 0;
1344 } 1344 }
1345 if (fast_string_match (XCONS (tail)->car, error_message) >= 0) 1345 if (fast_string_match (XCAR (tail), error_message) >= 0)
1346 return 1; 1346 return 1;
1347 } 1347 }
1348 else 1348 else
@@ -1350,8 +1350,8 @@ skip_debugger (conditions, data)
1350 Lisp_Object contail; 1350 Lisp_Object contail;
1351 1351
1352 for (contail = conditions; CONSP (contail); 1352 for (contail = conditions; CONSP (contail);
1353 contail = XCONS (contail)->cdr) 1353 contail = XCDR (contail))
1354 if (EQ (XCONS (tail)->car, XCONS (contail)->car)) 1354 if (EQ (XCAR (tail), XCAR (contail)))
1355 return 1; 1355 return 1;
1356 } 1356 }
1357 } 1357 }
@@ -1458,7 +1458,7 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr)
1458 tem = Fmemq (Fcar (condit), conditions); 1458 tem = Fmemq (Fcar (condit), conditions);
1459 if (!NILP (tem)) 1459 if (!NILP (tem))
1460 return handler; 1460 return handler;
1461 condit = XCONS (condit)->cdr; 1461 condit = XCDR (condit);
1462 } 1462 }
1463 } 1463 }
1464 } 1464 }
@@ -1599,7 +1599,7 @@ this does nothing and returns nil.")
1599 /* If function is defined and not as an autoload, don't override */ 1599 /* If function is defined and not as an autoload, don't override */
1600 if (!EQ (XSYMBOL (function)->function, Qunbound) 1600 if (!EQ (XSYMBOL (function)->function, Qunbound)
1601 && !(CONSP (XSYMBOL (function)->function) 1601 && !(CONSP (XSYMBOL (function)->function)
1602 && EQ (XCONS (XSYMBOL (function)->function)->car, Qautoload))) 1602 && EQ (XCAR (XSYMBOL (function)->function), Qautoload)))
1603 return Qnil; 1603 return Qnil;
1604 1604
1605#ifdef NO_ARG_ARRAY 1605#ifdef NO_ARG_ARRAY
@@ -1929,7 +1929,7 @@ Thus, (apply '+ 1 2 '(3 4)) returns 10.")
1929 return Ffuncall (nargs - 1, args); 1929 return Ffuncall (nargs - 1, args);
1930 else if (numargs == 1) 1930 else if (numargs == 1)
1931 { 1931 {
1932 args [nargs - 1] = XCONS (spread_arg)->car; 1932 args [nargs - 1] = XCAR (spread_arg);
1933 return Ffuncall (nargs, args); 1933 return Ffuncall (nargs, args);
1934 } 1934 }
1935 1935
@@ -1977,8 +1977,8 @@ Thus, (apply '+ 1 2 '(3 4)) returns 10.")
1977 i = nargs - 1; 1977 i = nargs - 1;
1978 while (!NILP (spread_arg)) 1978 while (!NILP (spread_arg))
1979 { 1979 {
1980 funcall_args [i++] = XCONS (spread_arg)->car; 1980 funcall_args [i++] = XCAR (spread_arg);
1981 spread_arg = XCONS (spread_arg)->cdr; 1981 spread_arg = XCDR (spread_arg);
1982 } 1982 }
1983 1983
1984 RETURN_UNGCPRO (Ffuncall (gcpro1.nvars, funcall_args)); 1984 RETURN_UNGCPRO (Ffuncall (gcpro1.nvars, funcall_args));
@@ -2101,7 +2101,7 @@ run_hook_with_args (nargs, args, cond)
2101 2101
2102 if (EQ (val, Qunbound) || NILP (val)) 2102 if (EQ (val, Qunbound) || NILP (val))
2103 return ret; 2103 return ret;
2104 else if (!CONSP (val) || EQ (XCONS (val)->car, Qlambda)) 2104 else if (!CONSP (val) || EQ (XCAR (val), Qlambda))
2105 { 2105 {
2106 args[0] = val; 2106 args[0] = val;
2107 return Ffuncall (nargs, args); 2107 return Ffuncall (nargs, args);
@@ -2115,9 +2115,9 @@ run_hook_with_args (nargs, args, cond)
2115 CONSP (val) && ((cond == to_completion) 2115 CONSP (val) && ((cond == to_completion)
2116 || (cond == until_success ? NILP (ret) 2116 || (cond == until_success ? NILP (ret)
2117 : !NILP (ret))); 2117 : !NILP (ret)));
2118 val = XCONS (val)->cdr) 2118 val = XCDR (val))
2119 { 2119 {
2120 if (EQ (XCONS (val)->car, Qt)) 2120 if (EQ (XCAR (val), Qt))
2121 { 2121 {
2122 /* t indicates this hook has a local binding; 2122 /* t indicates this hook has a local binding;
2123 it means to run the global binding too. */ 2123 it means to run the global binding too. */
@@ -2126,9 +2126,9 @@ run_hook_with_args (nargs, args, cond)
2126 CONSP (globals) && ((cond == to_completion) 2126 CONSP (globals) && ((cond == to_completion)
2127 || (cond == until_success ? NILP (ret) 2127 || (cond == until_success ? NILP (ret)
2128 : !NILP (ret))); 2128 : !NILP (ret)));
2129 globals = XCONS (globals)->cdr) 2129 globals = XCDR (globals))
2130 { 2130 {
2131 args[0] = XCONS (globals)->car; 2131 args[0] = XCAR (globals);
2132 /* In a global value, t should not occur. If it does, we 2132 /* In a global value, t should not occur. If it does, we
2133 must ignore it to avoid an endless loop. */ 2133 must ignore it to avoid an endless loop. */
2134 if (!EQ (args[0], Qt)) 2134 if (!EQ (args[0], Qt))
@@ -2137,7 +2137,7 @@ run_hook_with_args (nargs, args, cond)
2137 } 2137 }
2138 else 2138 else
2139 { 2139 {
2140 args[0] = XCONS (val)->car; 2140 args[0] = XCAR (val);
2141 ret = Ffuncall (nargs, args); 2141 ret = Ffuncall (nargs, args);
2142 } 2142 }
2143 } 2143 }
@@ -2169,18 +2169,18 @@ run_hook_list_with_args (funlist, nargs, args)
2169 globals = Qnil; 2169 globals = Qnil;
2170 GCPRO3 (sym, val, globals); 2170 GCPRO3 (sym, val, globals);
2171 2171
2172 for (val = funlist; CONSP (val); val = XCONS (val)->cdr) 2172 for (val = funlist; CONSP (val); val = XCDR (val))
2173 { 2173 {
2174 if (EQ (XCONS (val)->car, Qt)) 2174 if (EQ (XCAR (val), Qt))
2175 { 2175 {
2176 /* t indicates this hook has a local binding; 2176 /* t indicates this hook has a local binding;
2177 it means to run the global binding too. */ 2177 it means to run the global binding too. */
2178 2178
2179 for (globals = Fdefault_value (sym); 2179 for (globals = Fdefault_value (sym);
2180 CONSP (globals); 2180 CONSP (globals);
2181 globals = XCONS (globals)->cdr) 2181 globals = XCDR (globals))
2182 { 2182 {
2183 args[0] = XCONS (globals)->car; 2183 args[0] = XCAR (globals);
2184 /* In a global value, t should not occur. If it does, we 2184 /* In a global value, t should not occur. If it does, we
2185 must ignore it to avoid an endless loop. */ 2185 must ignore it to avoid an endless loop. */
2186 if (!EQ (args[0], Qt)) 2186 if (!EQ (args[0], Qt))
@@ -2189,7 +2189,7 @@ run_hook_list_with_args (funlist, nargs, args)
2189 } 2189 }
2190 else 2190 else
2191 { 2191 {
2192 args[0] = XCONS (val)->car; 2192 args[0] = XCAR (val);
2193 Ffuncall (nargs, args); 2193 Ffuncall (nargs, args);
2194 } 2194 }
2195 } 2195 }
@@ -2675,8 +2675,8 @@ DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode,
2675 tem = read_doc_string (XVECTOR (object)->contents[COMPILED_BYTECODE]); 2675 tem = read_doc_string (XVECTOR (object)->contents[COMPILED_BYTECODE]);
2676 if (!CONSP (tem)) 2676 if (!CONSP (tem))
2677 error ("invalid byte code"); 2677 error ("invalid byte code");
2678 XVECTOR (object)->contents[COMPILED_BYTECODE] = XCONS (tem)->car; 2678 XVECTOR (object)->contents[COMPILED_BYTECODE] = XCAR (tem);
2679 XVECTOR (object)->contents[COMPILED_CONSTANTS] = XCONS (tem)->cdr; 2679 XVECTOR (object)->contents[COMPILED_CONSTANTS] = XCDR (tem);
2680 } 2680 }
2681 return object; 2681 return object;
2682} 2682}