GNU bug report logs -
#2435
23.0.90; customize/whitespace: display stops updating
Previous Next
Full log
View this message in rfc822 format
In article <877i33cmto.fsf <at> cyd.mit.edu>, Chong Yidong <cyd <at> stupidchicken.com> writes:
> Kenichi Handa <handa <at> m17n.org> writes:
> > We should take care of re_search_2 and re_match_2_internal
> > too.
> >
> > If the problem is only the call of openp in
> > load_charset_map_from_file, and building various Lisp object
> > is ok, we can change load_charset_map_from_file to open a
> > charset map by itself without using openp.
> Not using openp would be troublesome. How about binding
> file-name-handler-alist to nil inside load_charset_map_from_file? That
> prevents find-file-name-handler from performing the regexp compilation
> and string search.
That's a good idea if "building various Lisp object is ok"
is true.
Stefan, what do you think?
---
Kenichi Handa
handa <at> m17n.org
*** charset.c.~1.169.~ 2009-01-30 21:29:36.000000000 +0900
--- charset.c 2009-03-06 13:44:24.000000000 +0900
***************
*** 494,499 ****
--- 494,509 ----
extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object));
+ extern Lisp_Object Vfile_name_handler_alist;
+
+ static Lisp_Object
+ load_charset_map_from_file_restore (arg)
+ Lisp_Object arg;
+ {
+ Vfile_name_handler_alist = arg;
+ return Qnil;
+ }
+
static void
load_charset_map_from_file (charset, mapfile, control_flag)
struct charset *charset;
***************
*** 508,518 ****
--- 518,533 ----
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));
+ record_unwind_protect (load_charset_map_from_file_restore,
+ Vfile_name_handler_alist);
+ Vfile_name_handler_alist = Qnil;
fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil);
+ unbind_to (count, Qnil);
if (fd < 0
|| ! (fp = fdopen (fd, "r")))
{
This bug report was last modified 16 years and 135 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.