GNU bug report logs - #2435
23.0.90; customize/whitespace: display stops updating

Previous Next

Package: emacs;

Reported by: Jindrich Makovicka <makovick <at> gmail.com>

Date: Sun, 22 Feb 2009 16:50:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kenichi Handa <handa <at> m17n.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: cyd <at> stupidchicken.com, 2435 <at> debbugs.gnu.org
Subject: bug#2435: Bug 2435
Date: Mon, 09 Mar 2009 10:12:01 +0900
In article <jwvocwdszkq.fsf-monnier+emacsbugreports <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> AFAIK building objects is perfectly fine, yes.
>>> I wonder why you use record_unwind_protect rather than specbind, tho.
> > Don't we need record_unwind_protect for the case that quit
> > is signaled in emacs_open that is called from openp?

> specbind does the same thing (except that it's specially designed for
> the job at hand of temporarily modifying a variable).

Ah! I see.  Ok, I've just installed this change.

2009-03-09  Kenichi Handa  <handa <at> m17n.org>

	* charset.c (Qfile_name_handler_alist): Extern it.
	(load_charset_map_from_file): Temporarily bind
	`file-name-handler-alist' to nil while calling openp.

Index: charset.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/charset.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -r1.169 -r1.170
--- charset.c	4 Feb 2009 01:55:07 -0000	1.169
+++ charset.c	9 Mar 2009 01:09:23 -0000	1.170
@@ -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")))
     {

---
Kenichi Handa
handa <at> m17n.org




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.