diff options
| author | Ken Raeburn | 2001-10-16 09:09:51 +0000 |
|---|---|---|
| committer | Ken Raeburn | 2001-10-16 09:09:51 +0000 |
| commit | f3fbd1553534bb85c75baf891c0ca9aaa4c3fa6f (patch) | |
| tree | 43eb51ff0ca4af1705387403827ef210098f2da8 /src/lread.c | |
| parent | 018ba359ab456f6a43f3acea0c15df616aa0ad02 (diff) | |
| download | emacs-f3fbd1553534bb85c75baf891c0ca9aaa4c3fa6f.tar.gz emacs-f3fbd1553534bb85c75baf891c0ca9aaa4c3fa6f.zip | |
Avoid (most) uses of XCAR/XCDR as lvalues, for flexibility in experimenting
with lisp system changes.
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/lread.c b/src/lread.c index 671305c6f93..6968c5394fb 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -832,8 +832,8 @@ Return t if file exists.") | |||
| 832 | 832 | ||
| 833 | GCPRO1 (file); | 833 | GCPRO1 (file); |
| 834 | lispstream = Fcons (Qnil, Qnil); | 834 | lispstream = Fcons (Qnil, Qnil); |
| 835 | XSETFASTINT (XCAR (lispstream), (EMACS_UINT)stream >> 16); | 835 | XSETCARFASTINT (lispstream, (EMACS_UINT)stream >> 16); |
| 836 | XSETFASTINT (XCDR (lispstream), (EMACS_UINT)stream & 0xffff); | 836 | XSETCDRFASTINT (lispstream, (EMACS_UINT)stream & 0xffff); |
| 837 | record_unwind_protect (load_unwind, lispstream); | 837 | record_unwind_protect (load_unwind, lispstream); |
| 838 | record_unwind_protect (load_descriptor_unwind, load_descriptor_list); | 838 | record_unwind_protect (load_descriptor_unwind, load_descriptor_list); |
| 839 | specbind (Qload_file_name, found); | 839 | specbind (Qload_file_name, found); |
| @@ -963,16 +963,19 @@ openp (path, str, suffixes, storeptr, exec_only) | |||
| 963 | Lisp_Object string, tail; | 963 | Lisp_Object string, tail; |
| 964 | int max_suffix_len = 0; | 964 | int max_suffix_len = 0; |
| 965 | 965 | ||
| 966 | string = filename = Qnil; | ||
| 967 | GCPRO5 (str, string, filename, path, suffixes); | ||
| 968 | |||
| 966 | for (tail = suffixes; CONSP (tail); tail = XCDR (tail)) | 969 | for (tail = suffixes; CONSP (tail); tail = XCDR (tail)) |
| 967 | { | 970 | { |
| 968 | CHECK_STRING (XCAR (tail), 0); | 971 | string = XCAR (tail); |
| 972 | CHECK_STRING (string, 0); | ||
| 973 | if (! EQ (string, XCAR (tail))) | ||
| 974 | XSETCAR (tail, string); | ||
| 969 | max_suffix_len = max (max_suffix_len, | 975 | max_suffix_len = max (max_suffix_len, |
| 970 | STRING_BYTES (XSTRING (XCAR (tail)))); | 976 | STRING_BYTES (XSTRING (string))); |
| 971 | } | 977 | } |
| 972 | 978 | ||
| 973 | string = filename = Qnil; | ||
| 974 | GCPRO5 (str, string, filename, path, suffixes); | ||
| 975 | |||
| 976 | if (storeptr) | 979 | if (storeptr) |
| 977 | *storeptr = Qnil; | 980 | *storeptr = Qnil; |
| 978 | 981 | ||
| @@ -2724,7 +2727,7 @@ read_list (flag, readcharfun) | |||
| 2724 | { | 2727 | { |
| 2725 | GCPRO2 (val, tail); | 2728 | GCPRO2 (val, tail); |
| 2726 | if (!NILP (tail)) | 2729 | if (!NILP (tail)) |
| 2727 | XCDR (tail) = read0 (readcharfun); | 2730 | XSETCDR (tail, read0 (readcharfun)); |
| 2728 | else | 2731 | else |
| 2729 | val = read0 (readcharfun); | 2732 | val = read0 (readcharfun); |
| 2730 | read1 (readcharfun, &ch, 0); | 2733 | read1 (readcharfun, &ch, 0); |
| @@ -2817,7 +2820,7 @@ read_list (flag, readcharfun) | |||
| 2817 | ? pure_cons (elt, Qnil) | 2820 | ? pure_cons (elt, Qnil) |
| 2818 | : Fcons (elt, Qnil)); | 2821 | : Fcons (elt, Qnil)); |
| 2819 | if (!NILP (tail)) | 2822 | if (!NILP (tail)) |
| 2820 | XCDR (tail) = tem; | 2823 | XSETCDR (tail, tem); |
| 2821 | else | 2824 | else |
| 2822 | val = tem; | 2825 | val = tem; |
| 2823 | tail = tem; | 2826 | tail = tem; |