# HG changeset patch # User Kenichi Handa # Date 1236560963 0 # Node ID d05149e3855d4ab482603f060f58ccfd2433d209 # Parent f9bc8b29986ccf82ff9ec9bd0f00c1678fbef8b2 (Qfile_name_handler_alist): Extern it. (load_charset_map_from_file): Temporarily bind `file-name-handler-alist' to nil while calling openp. diff -r f9bc8b29986c -r d05149e3855d src/charset.c --- a/src/charset.c Sun Mar 08 19:54:32 2009 +0000 +++ b/src/charset.c Mon Mar 09 01:09:23 2009 +0000 @@ -477,6 +477,7 @@ return n; } +extern Lisp_Object Qfile_name_handler_alist; /* Return a mapping vector for CHARSET loaded from MAPFILE. Each line of MAPFILE has this form @@ -490,7 +491,10 @@ The returned vector has this form: [ CODE1 CHAR1 CODE2 CHAR2 .... ] where CODE1 is a code-point or a cons of code-points specifying a - range. */ + range. + + Note that this funciton uses `openp' to open MAPFILE but ignores + `file-name-handler-alist to avoid running any Lisp codes. */ extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object)); @@ -508,11 +512,14 @@ Lisp_Object suffixes; struct charset_map_entries *head, *entries; int n_entries; + int count = SPECPDL_INDEX (); suffixes = Fcons (build_string (".map"), Fcons (build_string (".TXT"), Qnil)); + specbind (Qfile_name_handler_alist, Qnil); fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil); + unbind_to (count, Qnil); if (fd < 0 || ! (fp = fdopen (fd, "r"))) {