comparison src/lread.c @ 20048:5324d8b2322b

(read_list): Don't recognize Vload_file_name specially if it is nil.
author Karl Heuer <kwzh@gnu.org>
date Wed, 15 Oct 1997 22:45:35 +0000
parents b0626d6a3f13
children 13074c25ab06
comparison
equal deleted inserted replaced
20047:735f0cdfc5b9 20048:5324d8b2322b
128 128
129 /* For use within read-from-string (this reader is non-reentrant!!) */ 129 /* For use within read-from-string (this reader is non-reentrant!!) */
130 static int read_from_string_index; 130 static int read_from_string_index;
131 static int read_from_string_limit; 131 static int read_from_string_limit;
132 132
133 /* This contains the last string skipped with #@. */ 133 /* This contains the last string skipped with #@, but only on some systems.
134 On other systems we can't put the string here. */
134 static char *saved_doc_string; 135 static char *saved_doc_string;
135 /* Length of buffer allocated in saved_doc_string. */ 136 /* Length of buffer allocated in saved_doc_string. */
136 static int saved_doc_string_size; 137 static int saved_doc_string_size;
137 /* Length of actual data in saved_doc_string. */ 138 /* Length of actual data in saved_doc_string. */
138 static int saved_doc_string_length; 139 static int saved_doc_string_length;
1515 { 1516 {
1516 /* Skip that many characters. */ 1517 /* Skip that many characters. */
1517 for (i = 0; i < nskip && c >= 0; i++) 1518 for (i = 0; i < nskip && c >= 0; i++)
1518 c = READCHAR; 1519 c = READCHAR;
1519 } 1520 }
1521
1520 goto retry; 1522 goto retry;
1521 } 1523 }
1522 if (c == '$') 1524 if (c == '$')
1523 return Vload_file_name; 1525 return Vload_file_name;
1524 if (c == '\'') 1526 if (c == '\'')
1940 1942
1941 first_in_list = 0; 1943 first_in_list = 0;
1942 1944
1943 /* While building, if the list starts with #$, treat it specially. */ 1945 /* While building, if the list starts with #$, treat it specially. */
1944 if (EQ (elt, Vload_file_name) 1946 if (EQ (elt, Vload_file_name)
1947 && ! NILP (elt)
1945 && !NILP (Vpurify_flag)) 1948 && !NILP (Vpurify_flag))
1946 { 1949 {
1947 if (NILP (Vdoc_file_name)) 1950 if (NILP (Vdoc_file_name))
1948 /* We have not yet called Snarf-documentation, so assume 1951 /* We have not yet called Snarf-documentation, so assume
1949 this file is described in the DOC-MM.NN file 1952 this file is described in the DOC-MM.NN file
1958 the directory absolute now. */ 1961 the directory absolute now. */
1959 elt = concat2 (build_string ("../lisp/"), 1962 elt = concat2 (build_string ("../lisp/"),
1960 Ffile_name_nondirectory (elt)); 1963 Ffile_name_nondirectory (elt));
1961 } 1964 }
1962 else if (EQ (elt, Vload_file_name) 1965 else if (EQ (elt, Vload_file_name)
1966 && ! NILP (elt)
1963 && load_force_doc_strings) 1967 && load_force_doc_strings)
1964 doc_reference = 2; 1968 doc_reference = 2;
1965 1969
1966 if (ch) 1970 if (ch)
1967 { 1971 {