diff options
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/src/lread.c b/src/lread.c index 66b13916465..703c5fe242c 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2288,13 +2288,13 @@ readevalloop (Lisp_Object readcharfun, | |||
| 2288 | read_objects_map | 2288 | read_objects_map |
| 2289 | = make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE, | 2289 | = make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE, |
| 2290 | DEFAULT_REHASH_SIZE, DEFAULT_REHASH_THRESHOLD, | 2290 | DEFAULT_REHASH_SIZE, DEFAULT_REHASH_THRESHOLD, |
| 2291 | Qnil, false); | 2291 | Qnil); |
| 2292 | if (! HASH_TABLE_P (read_objects_completed) | 2292 | if (! HASH_TABLE_P (read_objects_completed) |
| 2293 | || XHASH_TABLE (read_objects_completed)->count) | 2293 | || XHASH_TABLE (read_objects_completed)->count) |
| 2294 | read_objects_completed | 2294 | read_objects_completed |
| 2295 | = make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE, | 2295 | = make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE, |
| 2296 | DEFAULT_REHASH_SIZE, DEFAULT_REHASH_THRESHOLD, | 2296 | DEFAULT_REHASH_SIZE, DEFAULT_REHASH_THRESHOLD, |
| 2297 | Qnil, false); | 2297 | Qnil); |
| 2298 | if (!NILP (Vpurify_flag) && c == '(') | 2298 | if (!NILP (Vpurify_flag) && c == '(') |
| 2299 | val = read0 (readcharfun, false); | 2299 | val = read0 (readcharfun, false); |
| 2300 | else | 2300 | else |
| @@ -2539,12 +2539,12 @@ read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end, | |||
| 2539 | || XHASH_TABLE (read_objects_map)->count) | 2539 | || XHASH_TABLE (read_objects_map)->count) |
| 2540 | read_objects_map | 2540 | read_objects_map |
| 2541 | = make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE, DEFAULT_REHASH_SIZE, | 2541 | = make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE, DEFAULT_REHASH_SIZE, |
| 2542 | DEFAULT_REHASH_THRESHOLD, Qnil, false); | 2542 | DEFAULT_REHASH_THRESHOLD, Qnil); |
| 2543 | if (! HASH_TABLE_P (read_objects_completed) | 2543 | if (! HASH_TABLE_P (read_objects_completed) |
| 2544 | || XHASH_TABLE (read_objects_completed)->count) | 2544 | || XHASH_TABLE (read_objects_completed)->count) |
| 2545 | read_objects_completed | 2545 | read_objects_completed |
| 2546 | = make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE, DEFAULT_REHASH_SIZE, | 2546 | = make_hash_table (hashtest_eq, DEFAULT_HASH_SIZE, DEFAULT_REHASH_SIZE, |
| 2547 | DEFAULT_REHASH_THRESHOLD, Qnil, false); | 2547 | DEFAULT_REHASH_THRESHOLD, Qnil); |
| 2548 | 2548 | ||
| 2549 | if (STRINGP (stream) | 2549 | if (STRINGP (stream) |
| 2550 | || ((CONSP (stream) && STRINGP (XCAR (stream))))) | 2550 | || ((CONSP (stream) && STRINGP (XCAR (stream))))) |
| @@ -4150,10 +4150,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms) | |||
| 4150 | if (uninterned_symbol) | 4150 | if (uninterned_symbol) |
| 4151 | { | 4151 | { |
| 4152 | Lisp_Object name | 4152 | Lisp_Object name |
| 4153 | = (!NILP (Vpurify_flag) | 4153 | = make_specified_string (read_buffer, nchars, nbytes, multibyte); |
| 4154 | ? make_pure_string (read_buffer, nchars, nbytes, multibyte) | ||
| 4155 | : make_specified_string (read_buffer, nchars, nbytes, | ||
| 4156 | multibyte)); | ||
| 4157 | result = Fmake_symbol (name); | 4154 | result = Fmake_symbol (name); |
| 4158 | } | 4155 | } |
| 4159 | else | 4156 | else |
| @@ -4645,16 +4642,8 @@ intern_c_string_1 (const char *str, ptrdiff_t len) | |||
| 4645 | Lisp_Object tem = oblookup (obarray, str, len, len); | 4642 | Lisp_Object tem = oblookup (obarray, str, len, len); |
| 4646 | 4643 | ||
| 4647 | if (!SYMBOLP (tem)) | 4644 | if (!SYMBOLP (tem)) |
| 4648 | { | 4645 | tem = intern_driver (make_string (str, len), obarray, tem); |
| 4649 | Lisp_Object string; | ||
| 4650 | 4646 | ||
| 4651 | if (NILP (Vpurify_flag)) | ||
| 4652 | string = make_string (str, len); | ||
| 4653 | else | ||
| 4654 | string = make_pure_c_string (str, len); | ||
| 4655 | |||
| 4656 | tem = intern_driver (string, obarray, tem); | ||
| 4657 | } | ||
| 4658 | return tem; | 4647 | return tem; |
| 4659 | } | 4648 | } |
| 4660 | 4649 | ||
| @@ -4662,7 +4651,7 @@ static void | |||
| 4662 | define_symbol (Lisp_Object sym, char const *str) | 4651 | define_symbol (Lisp_Object sym, char const *str) |
| 4663 | { | 4652 | { |
| 4664 | ptrdiff_t len = strlen (str); | 4653 | ptrdiff_t len = strlen (str); |
| 4665 | Lisp_Object string = make_pure_c_string (str, len); | 4654 | Lisp_Object string = make_string (str, len); |
| 4666 | init_symbol (sym, string); | 4655 | init_symbol (sym, string); |
| 4667 | 4656 | ||
| 4668 | /* Qunbound is uninterned, so that it's not confused with any symbol | 4657 | /* Qunbound is uninterned, so that it's not confused with any symbol |
| @@ -4706,8 +4695,7 @@ it defaults to the value of `obarray'. */) | |||
| 4706 | xfree (longhand); | 4695 | xfree (longhand); |
| 4707 | } | 4696 | } |
| 4708 | else | 4697 | else |
| 4709 | tem = intern_driver (NILP (Vpurify_flag) ? string : Fpurecopy (string), | 4698 | tem = intern_driver (string, obarray, tem); |
| 4710 | obarray, tem); | ||
| 4711 | } | 4699 | } |
| 4712 | return tem; | 4700 | return tem; |
| 4713 | } | 4701 | } |
| @@ -5412,20 +5400,20 @@ This list includes suffixes for both compiled and source Emacs Lisp files. | |||
| 5412 | This list should not include the empty string. | 5400 | This list should not include the empty string. |
| 5413 | `load' and related functions try to append these suffixes, in order, | 5401 | `load' and related functions try to append these suffixes, in order, |
| 5414 | to the specified file name if a suffix is allowed or required. */); | 5402 | to the specified file name if a suffix is allowed or required. */); |
| 5415 | Vload_suffixes = list2 (build_pure_c_string (".elc"), | 5403 | Vload_suffixes = list2 (build_string (".elc"), |
| 5416 | build_pure_c_string (".el")); | 5404 | build_string (".el")); |
| 5417 | #ifdef HAVE_MODULES | 5405 | #ifdef HAVE_MODULES |
| 5418 | Vload_suffixes = Fcons (build_pure_c_string (MODULES_SUFFIX), Vload_suffixes); | 5406 | Vload_suffixes = Fcons (build_string (MODULES_SUFFIX), Vload_suffixes); |
| 5419 | #ifdef MODULES_SECONDARY_SUFFIX | 5407 | #ifdef MODULES_SECONDARY_SUFFIX |
| 5420 | Vload_suffixes = | 5408 | Vload_suffixes = |
| 5421 | Fcons (build_pure_c_string (MODULES_SECONDARY_SUFFIX), Vload_suffixes); | 5409 | Fcons (build_string (MODULES_SECONDARY_SUFFIX), Vload_suffixes); |
| 5422 | #endif | 5410 | #endif |
| 5423 | 5411 | ||
| 5424 | #endif | 5412 | #endif |
| 5425 | DEFVAR_LISP ("module-file-suffix", Vmodule_file_suffix, | 5413 | DEFVAR_LISP ("module-file-suffix", Vmodule_file_suffix, |
| 5426 | doc: /* Suffix of loadable module file, or nil if modules are not supported. */); | 5414 | doc: /* Suffix of loadable module file, or nil if modules are not supported. */); |
| 5427 | #ifdef HAVE_MODULES | 5415 | #ifdef HAVE_MODULES |
| 5428 | Vmodule_file_suffix = build_pure_c_string (MODULES_SUFFIX); | 5416 | Vmodule_file_suffix = build_string (MODULES_SUFFIX); |
| 5429 | #else | 5417 | #else |
| 5430 | Vmodule_file_suffix = Qnil; | 5418 | Vmodule_file_suffix = Qnil; |
| 5431 | #endif | 5419 | #endif |
| @@ -5575,7 +5563,7 @@ from the file, and matches them against this regular expression. | |||
| 5575 | When the regular expression matches, the file is considered to be safe | 5563 | When the regular expression matches, the file is considered to be safe |
| 5576 | to load. */); | 5564 | to load. */); |
| 5577 | Vbytecomp_version_regexp | 5565 | Vbytecomp_version_regexp |
| 5578 | = build_pure_c_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)"); | 5566 | = build_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)"); |
| 5579 | 5567 | ||
| 5580 | DEFSYM (Qlexical_binding, "lexical-binding"); | 5568 | DEFSYM (Qlexical_binding, "lexical-binding"); |
| 5581 | DEFVAR_LISP ("lexical-binding", Vlexical_binding, | 5569 | DEFVAR_LISP ("lexical-binding", Vlexical_binding, |