summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c76
1 files changed, 30 insertions, 46 deletions
diff --git a/src/lread.c b/src/lread.c
index 66b13916465..ada20810c3a 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1537,7 +1537,7 @@ Return t if the file exists and loads successfully. */)
}
if (! NILP (Vpurify_flag))
- Vpreloaded_file_list = Fcons (Fpurecopy (file), Vpreloaded_file_list);
+ Vpreloaded_file_list = Fcons (file, Vpreloaded_file_list);
if (NILP (nomessage) || force_load_messages)
{
@@ -2288,36 +2288,32 @@ readevalloop (Lisp_Object readcharfun,
read_objects_map
= make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE,
DEFAULT_REHASH_SIZE, DEFAULT_REHASH_THRESHOLD,
- Qnil, false);
+ Qnil);
if (! HASH_TABLE_P (read_objects_completed)
|| XHASH_TABLE (read_objects_completed)->count)
read_objects_completed
= make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE,
DEFAULT_REHASH_SIZE, DEFAULT_REHASH_THRESHOLD,
- Qnil, false);
- if (!NILP (Vpurify_flag) && c == '(')
- val = read0 (readcharfun, false);
- else
+ Qnil);
+ if (!NILP (readfun))
{
- if (!NILP (readfun))
- {
- val = call1 (readfun, readcharfun);
+ val = call1 (readfun, readcharfun);
- /* If READCHARFUN has set point to ZV, we should
+ /* If READCHARFUN has set point to ZV, we should
stop reading, even if the form read sets point
to a different value when evaluated. */
- if (BUFFERP (readcharfun))
- {
- struct buffer *buf = XBUFFER (readcharfun);
- if (BUF_PT (buf) == BUF_ZV (buf))
- continue_reading_p = 0;
- }
+ if (BUFFERP (readcharfun))
+ {
+ struct buffer *buf = XBUFFER (readcharfun);
+ if (BUF_PT (buf) == BUF_ZV (buf))
+ continue_reading_p = 0;
}
- else if (! NILP (Vload_read_function))
- val = call1 (Vload_read_function, readcharfun);
- else
- val = read_internal_start (readcharfun, Qnil, Qnil, false);
}
+ else if (! NILP (Vload_read_function))
+ val = call1 (Vload_read_function, readcharfun);
+ else
+ val = read_internal_start (readcharfun, Qnil, Qnil, false);
+
/* Empty hashes can be reused; otherwise, reset on next call. */
if (HASH_TABLE_P (read_objects_map)
&& XHASH_TABLE (read_objects_map)->count > 0)
@@ -2539,12 +2535,12 @@ read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end,
|| XHASH_TABLE (read_objects_map)->count)
read_objects_map
= make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE, DEFAULT_REHASH_SIZE,
- DEFAULT_REHASH_THRESHOLD, Qnil, false);
+ DEFAULT_REHASH_THRESHOLD, Qnil);
if (! HASH_TABLE_P (read_objects_completed)
|| XHASH_TABLE (read_objects_completed)->count)
read_objects_completed
= make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE, DEFAULT_REHASH_SIZE,
- DEFAULT_REHASH_THRESHOLD, Qnil, false);
+ DEFAULT_REHASH_THRESHOLD, Qnil);
if (STRINGP (stream)
|| ((CONSP (stream) && STRINGP (XCAR (stream)))))
@@ -4150,10 +4146,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms)
if (uninterned_symbol)
{
Lisp_Object name
- = (!NILP (Vpurify_flag)
- ? make_pure_string (read_buffer, nchars, nbytes, multibyte)
- : make_specified_string (read_buffer, nchars, nbytes,
- multibyte));
+ = make_specified_string (read_buffer, nchars, nbytes, multibyte);
result = Fmake_symbol (name);
}
else
@@ -4645,16 +4638,8 @@ intern_c_string_1 (const char *str, ptrdiff_t len)
Lisp_Object tem = oblookup (obarray, str, len, len);
if (!SYMBOLP (tem))
- {
- Lisp_Object string;
+ tem = intern_driver (make_string (str, len), obarray, tem);
- if (NILP (Vpurify_flag))
- string = make_string (str, len);
- else
- string = make_pure_c_string (str, len);
-
- tem = intern_driver (string, obarray, tem);
- }
return tem;
}
@@ -4662,7 +4647,7 @@ static void
define_symbol (Lisp_Object sym, char const *str)
{
ptrdiff_t len = strlen (str);
- Lisp_Object string = make_pure_c_string (str, len);
+ Lisp_Object string = make_string (str, len);
init_symbol (sym, string);
/* Qunbound is uninterned, so that it's not confused with any symbol
@@ -4706,8 +4691,7 @@ it defaults to the value of `obarray'. */)
xfree (longhand);
}
else
- tem = intern_driver (NILP (Vpurify_flag) ? string : Fpurecopy (string),
- obarray, tem);
+ tem = intern_driver (string, obarray, tem);
}
return tem;
}
@@ -5002,7 +4986,7 @@ init_obarray_once (void)
XSYMBOL (Qt)->u.s.declared_special = true;
/* Qt is correct even if not dumping. loadup.el will set to nil at end. */
- Vpurify_flag = Qt;
+ Vpurify_flag = Qt; /* FIXME: Redundant with setting in alloc.c. */
DEFSYM (Qvariable_documentation, "variable-documentation");
}
@@ -5019,7 +5003,7 @@ defsubr (union Aligned_Lisp_Subr *aname)
set_symbol_function (sym, tem);
#ifdef HAVE_NATIVE_COMP
eassert (NILP (Vcomp_abi_hash));
- Vcomp_subr_list = Fpurecopy (Fcons (tem, Vcomp_subr_list));
+ Vcomp_subr_list = Fcons (tem, Vcomp_subr_list);
#endif
}
@@ -5412,20 +5396,20 @@ This list includes suffixes for both compiled and source Emacs Lisp files.
This list should not include the empty string.
`load' and related functions try to append these suffixes, in order,
to the specified file name if a suffix is allowed or required. */);
- Vload_suffixes = list2 (build_pure_c_string (".elc"),
- build_pure_c_string (".el"));
+ Vload_suffixes = list2 (build_string (".elc"),
+ build_string (".el"));
#ifdef HAVE_MODULES
- Vload_suffixes = Fcons (build_pure_c_string (MODULES_SUFFIX), Vload_suffixes);
+ Vload_suffixes = Fcons (build_string (MODULES_SUFFIX), Vload_suffixes);
#ifdef MODULES_SECONDARY_SUFFIX
Vload_suffixes =
- Fcons (build_pure_c_string (MODULES_SECONDARY_SUFFIX), Vload_suffixes);
+ Fcons (build_string (MODULES_SECONDARY_SUFFIX), Vload_suffixes);
#endif
#endif
DEFVAR_LISP ("module-file-suffix", Vmodule_file_suffix,
doc: /* Suffix of loadable module file, or nil if modules are not supported. */);
#ifdef HAVE_MODULES
- Vmodule_file_suffix = build_pure_c_string (MODULES_SUFFIX);
+ Vmodule_file_suffix = build_string (MODULES_SUFFIX);
#else
Vmodule_file_suffix = Qnil;
#endif
@@ -5575,7 +5559,7 @@ from the file, and matches them against this regular expression.
When the regular expression matches, the file is considered to be safe
to load. */);
Vbytecomp_version_regexp
- = build_pure_c_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)");
+ = build_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)");
DEFSYM (Qlexical_binding, "lexical-binding");
DEFVAR_LISP ("lexical-binding", Vlexical_binding,