aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias EngdegÄrd2025-07-10 13:32:55 +0200
committerMattias EngdegÄrd2025-07-10 13:45:50 +0200
commitb83f2d16fbd327e04186c5ae94f90bb907294573 (patch)
tree034f7cdafc7edc275a0bd048cc228ac37023e4f8 /src
parentcd3727f7e0607a152a97b534ee09a2cb8ac6cb84 (diff)
downloademacs-b83f2d16fbd327e04186c5ae94f90bb907294573.tar.gz
emacs-b83f2d16fbd327e04186c5ae94f90bb907294573.zip
Unintern Qget_file_char and Qget_emacs_mule_file_char
These symbols are used in the reader as special constants and can't be passed from Lisp (Emacs would crash). * src/lread.c (syms_of_lread): Unintern. (init_source): Use BASE_EQ.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lread.c b/src/lread.c
index 45ce3625a64..5b7848c3118 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -310,13 +310,14 @@ init_source (source_t *src, Lisp_Object readcharfun)
310 src->unget = source_string_unget; 310 src->unget = source_string_unget;
311 src->multibyte = STRING_MULTIBYTE (readcharfun); 311 src->multibyte = STRING_MULTIBYTE (readcharfun);
312 } 312 }
313 else if (EQ (readcharfun, Qget_file_char) 313 else if (BASE_EQ (readcharfun, Qget_file_char)
314 || EQ (readcharfun, Qget_emacs_mule_file_char)) 314 || BASE_EQ (readcharfun, Qget_emacs_mule_file_char))
315 { 315 {
316 src->get = source_file_get; 316 src->get = source_file_get;
317 src->unget = source_file_unget; 317 src->unget = source_file_unget;
318 src->multibyte = true; 318 src->multibyte = true;
319 src->emacs_mule_encoding = EQ (readcharfun, Qget_emacs_mule_file_char); 319 src->emacs_mule_encoding = BASE_EQ (readcharfun,
320 Qget_emacs_mule_file_char);
320 eassert (infile != NULL); 321 eassert (infile != NULL);
321 } 322 }
322 else 323 else
@@ -6169,12 +6170,18 @@ will use instead of `load-path' to look for the file to load. */);
6169 DEFSYM (Qcurrent_load_list, "current-load-list"); 6170 DEFSYM (Qcurrent_load_list, "current-load-list");
6170 DEFSYM (Qstandard_input, "standard-input"); 6171 DEFSYM (Qstandard_input, "standard-input");
6171 DEFSYM (Qread_char, "read-char"); 6172 DEFSYM (Qread_char, "read-char");
6173
6172 DEFSYM (Qget_file_char, "get-file-char"); 6174 DEFSYM (Qget_file_char, "get-file-char");
6173 6175
6174 /* Used instead of Qget_file_char while loading *.elc files compiled 6176 /* Used instead of Qget_file_char while loading *.elc files compiled
6175 by Emacs 21 or older. */ 6177 by Emacs 21 or older. */
6176 DEFSYM (Qget_emacs_mule_file_char, "get-emacs-mule-file-char"); 6178 DEFSYM (Qget_emacs_mule_file_char, "get-emacs-mule-file-char");
6177 6179
6180 /* These are only used as internal READCHARFUN in the C code and
6181 cannot be used from Lisp. */
6182 Funintern (Qget_file_char, Qnil);
6183 Funintern (Qget_emacs_mule_file_char, Qnil);
6184
6178 DEFSYM (Qload_force_doc_strings, "load-force-doc-strings"); 6185 DEFSYM (Qload_force_doc_strings, "load-force-doc-strings");
6179 6186
6180 DEFSYM (Qbackquote, "`"); 6187 DEFSYM (Qbackquote, "`");