aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileio.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/fileio.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/fileio.c')
-rw-r--r--src/fileio.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/fileio.c b/src/fileio.c
index efe7f432e2a..8d5e32eb426 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -344,19 +344,19 @@ use the standard functions without calling themselves recursively.")
344 inhibited_handlers = Qnil; 344 inhibited_handlers = Qnil;
345 345
346 for (chain = Vfile_name_handler_alist; CONSP (chain); 346 for (chain = Vfile_name_handler_alist; CONSP (chain);
347 chain = XCONS (chain)->cdr) 347 chain = XCDR (chain))
348 { 348 {
349 Lisp_Object elt; 349 Lisp_Object elt;
350 elt = XCONS (chain)->car; 350 elt = XCAR (chain);
351 if (CONSP (elt)) 351 if (CONSP (elt))
352 { 352 {
353 Lisp_Object string; 353 Lisp_Object string;
354 string = XCONS (elt)->car; 354 string = XCAR (elt);
355 if (STRINGP (string) && fast_string_match (string, filename) >= 0) 355 if (STRINGP (string) && fast_string_match (string, filename) >= 0)
356 { 356 {
357 Lisp_Object handler, tem; 357 Lisp_Object handler, tem;
358 358
359 handler = XCONS (elt)->cdr; 359 handler = XCDR (elt);
360 tem = Fmemq (handler, inhibited_handlers); 360 tem = Fmemq (handler, inhibited_handlers);
361 if (NILP (tem)) 361 if (NILP (tem))
362 return handler; 362 return handler;
@@ -3375,8 +3375,8 @@ actually used.")
3375 { 3375 {
3376 val = call6 (handler, Qinsert_file_contents, filename, 3376 val = call6 (handler, Qinsert_file_contents, filename,
3377 visit, beg, end, replace); 3377 visit, beg, end, replace);
3378 if (CONSP (val) && CONSP (XCONS (val)->cdr)) 3378 if (CONSP (val) && CONSP (XCDR (val)))
3379 inserted = XINT (XCONS (XCONS (val)->cdr)->car); 3379 inserted = XINT (XCAR (XCDR (val)));
3380 goto handled; 3380 goto handled;
3381 } 3381 }
3382 3382
@@ -3550,7 +3550,7 @@ actually used.")
3550 args[2] = visit, args[3] = beg, args[4] = end, args[5] = replace; 3550 args[2] = visit, args[3] = beg, args[4] = end, args[5] = replace;
3551 coding_systems = Ffind_operation_coding_system (6, args); 3551 coding_systems = Ffind_operation_coding_system (6, args);
3552 if (CONSP (coding_systems)) 3552 if (CONSP (coding_systems))
3553 val = XCONS (coding_systems)->car; 3553 val = XCAR (coding_systems);
3554 } 3554 }
3555 } 3555 }
3556 3556
@@ -4083,7 +4083,7 @@ actually used.")
4083 args[2] = visit, args[3] = beg, args[4] = end, args[5] = Qnil; 4083 args[2] = visit, args[3] = beg, args[4] = end, args[5] = Qnil;
4084 coding_systems = Ffind_operation_coding_system (6, args); 4084 coding_systems = Ffind_operation_coding_system (6, args);
4085 if (CONSP (coding_systems)) 4085 if (CONSP (coding_systems))
4086 val = XCONS (coding_systems)->car; 4086 val = XCAR (coding_systems);
4087 } 4087 }
4088 } 4088 }
4089 4089
@@ -4357,8 +4357,8 @@ This does code conversion according to the value of\n\
4357 args[3] = filename; args[4] = append; args[5] = visit; 4357 args[3] = filename; args[4] = append; args[5] = visit;
4358 args[6] = lockname; 4358 args[6] = lockname;
4359 coding_systems = Ffind_operation_coding_system (7, args); 4359 coding_systems = Ffind_operation_coding_system (7, args);
4360 if (CONSP (coding_systems) && !NILP (XCONS (coding_systems)->cdr)) 4360 if (CONSP (coding_systems) && !NILP (XCDR (coding_systems)))
4361 val = XCONS (coding_systems)->cdr; 4361 val = XCDR (coding_systems);
4362 } 4362 }
4363 4363
4364 if (NILP (val) 4364 if (NILP (val)
@@ -5079,8 +5079,8 @@ do_auto_save_unwind (stream) /* used as unwind-protect function */
5079{ 5079{
5080 auto_saving = 0; 5080 auto_saving = 0;
5081 if (!NILP (stream)) 5081 if (!NILP (stream))
5082 fclose ((FILE *) (XFASTINT (XCONS (stream)->car) << 16 5082 fclose ((FILE *) (XFASTINT (XCAR (stream)) << 16
5083 | XFASTINT (XCONS (stream)->cdr))); 5083 | XFASTINT (XCDR (stream))));
5084 return Qnil; 5084 return Qnil;
5085} 5085}
5086 5086
@@ -5141,8 +5141,8 @@ A non-nil CURRENT-ONLY argument means save only current buffer.")
5141 /* Arrange to close that file whether or not we get an error. 5141 /* Arrange to close that file whether or not we get an error.
5142 Also reset auto_saving to 0. */ 5142 Also reset auto_saving to 0. */
5143 lispstream = Fcons (Qnil, Qnil); 5143 lispstream = Fcons (Qnil, Qnil);
5144 XSETFASTINT (XCONS (lispstream)->car, (EMACS_UINT)stream >> 16); 5144 XSETFASTINT (XCAR (lispstream), (EMACS_UINT)stream >> 16);
5145 XSETFASTINT (XCONS (lispstream)->cdr, (EMACS_UINT)stream & 0xffff); 5145 XSETFASTINT (XCDR (lispstream), (EMACS_UINT)stream & 0xffff);
5146 } 5146 }
5147 else 5147 else
5148 lispstream = Qnil; 5148 lispstream = Qnil;
@@ -5165,9 +5165,9 @@ A non-nil CURRENT-ONLY argument means save only current buffer.")
5165 autosave perfectly ordinary files because it couldn't handle some 5165 autosave perfectly ordinary files because it couldn't handle some
5166 ange-ftp'd file. */ 5166 ange-ftp'd file. */
5167 for (do_handled_files = 0; do_handled_files < 2; do_handled_files++) 5167 for (do_handled_files = 0; do_handled_files < 2; do_handled_files++)
5168 for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCONS (tail)->cdr) 5168 for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCDR (tail))
5169 { 5169 {
5170 buf = XCONS (XCONS (tail)->car)->cdr; 5170 buf = XCDR (XCAR (tail));
5171 b = XBUFFER (buf); 5171 b = XBUFFER (buf);
5172 5172
5173 /* Record all the buffers that have auto save mode 5173 /* Record all the buffers that have auto save mode
@@ -5524,7 +5524,7 @@ DIR defaults to current buffer's directory default.")
5524 Qfile_name_history, default_filename, Qnil); 5524 Qfile_name_history, default_filename, Qnil);
5525 5525
5526 tem = Fsymbol_value (Qfile_name_history); 5526 tem = Fsymbol_value (Qfile_name_history);
5527 if (CONSP (tem) && EQ (XCONS (tem)->car, val)) 5527 if (CONSP (tem) && EQ (XCAR (tem), val))
5528 replace_in_history = 1; 5528 replace_in_history = 1;
5529 5529
5530 /* If Fcompleting_read returned the inserted default string itself 5530 /* If Fcompleting_read returned the inserted default string itself
@@ -5563,14 +5563,14 @@ DIR defaults to current buffer's directory default.")
5563 if (replace_in_history) 5563 if (replace_in_history)
5564 /* Replace what Fcompleting_read added to the history 5564 /* Replace what Fcompleting_read added to the history
5565 with what we will actually return. */ 5565 with what we will actually return. */
5566 XCONS (Fsymbol_value (Qfile_name_history))->car = double_dollars (val); 5566 XCAR (Fsymbol_value (Qfile_name_history)) = double_dollars (val);
5567 else if (add_to_history) 5567 else if (add_to_history)
5568 { 5568 {
5569 /* Add the value to the history--but not if it matches 5569 /* Add the value to the history--but not if it matches
5570 the last value already there. */ 5570 the last value already there. */
5571 Lisp_Object val1 = double_dollars (val); 5571 Lisp_Object val1 = double_dollars (val);
5572 tem = Fsymbol_value (Qfile_name_history); 5572 tem = Fsymbol_value (Qfile_name_history);
5573 if (! CONSP (tem) || NILP (Fequal (XCONS (tem)->car, val1))) 5573 if (! CONSP (tem) || NILP (Fequal (XCAR (tem), val1)))
5574 Fset (Qfile_name_history, 5574 Fset (Qfile_name_history,
5575 Fcons (val1, tem)); 5575 Fcons (val1, tem));
5576 } 5576 }