diff options
| author | Kenichi Handa | 2009-03-09 01:12:39 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2009-03-09 01:12:39 +0000 |
| commit | dde2559c4359338c0126950a6207e5f08114a170 (patch) | |
| tree | e95c280a0cda2280dcb947b786f83fbddae6b13f /src | |
| parent | 5ec9c7a4085e0c485bb00a35a65aa358e40faab7 (diff) | |
| download | emacs-dde2559c4359338c0126950a6207e5f08114a170.tar.gz emacs-dde2559c4359338c0126950a6207e5f08114a170.zip | |
(Qfile_name_handler_alist): Extern it.
(load_charset_map_from_file): Temporarily bind
`file-name-handler-alist' to nil while calling openp.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/charset.c | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1054979005f..24d5984d9e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2009-03-09 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * charset.c (Qfile_name_handler_alist): Extern it. | ||
| 4 | (load_charset_map_from_file): Temporarily bind | ||
| 5 | `file-name-handler-alist' to nil while calling openp. (Bug#2435) | ||
| 6 | |||
| 1 | 2009-03-06 Aaron Ecay <aaronecay@gmail.com> (tiny change) | 7 | 2009-03-06 Aaron Ecay <aaronecay@gmail.com> (tiny change) |
| 2 | 8 | ||
| 3 | * nsterm.m (ns_draw_vertical_window_border): Draw 1 pixel wide, | 9 | * nsterm.m (ns_draw_vertical_window_border): Draw 1 pixel wide, |
diff --git a/src/charset.c b/src/charset.c index 052f3186831..1cbfa2fd497 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -477,6 +477,7 @@ read_hex (fp, eof) | |||
| 477 | return n; | 477 | return n; |
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | extern Lisp_Object Qfile_name_handler_alist; | ||
| 480 | 481 | ||
| 481 | /* Return a mapping vector for CHARSET loaded from MAPFILE. | 482 | /* Return a mapping vector for CHARSET loaded from MAPFILE. |
| 482 | Each line of MAPFILE has this form | 483 | Each line of MAPFILE has this form |
| @@ -490,7 +491,10 @@ read_hex (fp, eof) | |||
| 490 | The returned vector has this form: | 491 | The returned vector has this form: |
| 491 | [ CODE1 CHAR1 CODE2 CHAR2 .... ] | 492 | [ CODE1 CHAR1 CODE2 CHAR2 .... ] |
| 492 | where CODE1 is a code-point or a cons of code-points specifying a | 493 | where CODE1 is a code-point or a cons of code-points specifying a |
| 493 | range. */ | 494 | range. |
| 495 | |||
| 496 | Note that this funciton uses `openp' to open MAPFILE but ignores | ||
| 497 | `file-name-handler-alist to avoid running any Lisp codes. */ | ||
| 494 | 498 | ||
| 495 | extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object)); | 499 | extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object)); |
| 496 | 500 | ||
| @@ -508,11 +512,14 @@ load_charset_map_from_file (charset, mapfile, control_flag) | |||
| 508 | Lisp_Object suffixes; | 512 | Lisp_Object suffixes; |
| 509 | struct charset_map_entries *head, *entries; | 513 | struct charset_map_entries *head, *entries; |
| 510 | int n_entries; | 514 | int n_entries; |
| 515 | int count = SPECPDL_INDEX (); | ||
| 511 | 516 | ||
| 512 | suffixes = Fcons (build_string (".map"), | 517 | suffixes = Fcons (build_string (".map"), |
| 513 | Fcons (build_string (".TXT"), Qnil)); | 518 | Fcons (build_string (".TXT"), Qnil)); |
| 514 | 519 | ||
| 520 | specbind (Qfile_name_handler_alist, Qnil); | ||
| 515 | fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil); | 521 | fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil); |
| 522 | unbind_to (count, Qnil); | ||
| 516 | if (fd < 0 | 523 | if (fd < 0 |
| 517 | || ! (fp = fdopen (fd, "r"))) | 524 | || ! (fp = fdopen (fd, "r"))) |
| 518 | { | 525 | { |