From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: question about frame local variable Date: Sat, 25 Oct 2003 09:49:47 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200310250049.JAA12659@etlken.m17n.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1067043049 9255 80.91.224.253 (25 Oct 2003 00:50:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 25 Oct 2003 00:50:49 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Oct 25 02:50:47 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ADCdj-0003PL-00 for ; Sat, 25 Oct 2003 02:50:47 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ADCdi-0005KX-00 for ; Sat, 25 Oct 2003 02:50:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ADCdS-0002N0-Nn for emacs-devel@quimby.gnus.org; Fri, 24 Oct 2003 20:50:30 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ADCdO-0002LL-1p for emacs-devel@gnu.org; Fri, 24 Oct 2003 20:50:26 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ADCcq-00021c-Jm for emacs-devel@gnu.org; Fri, 24 Oct 2003 20:50:23 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ADCcp-00021A-Qv for emacs-devel@gnu.org; Fri, 24 Oct 2003 20:49:52 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6p2/3.7W-20010518204228) with ESMTP id h9P0nmh04931 for ; Sat, 25 Oct 2003 09:49:48 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6/3.7W-20010823150639) with ESMTP id h9P0nls19227 for ; Sat, 25 Oct 2003 09:49:47 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id JAA12659; Sat, 25 Oct 2003 09:49:47 +0900 (JST) Original-To: emacs-devel@gnu.org User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17415 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17415 It seems that we need the attached patch to make a code like this (allow scalable fonts only for a specific frame) work well. (defun make-frame-allowing-scalable-fonts () (make-variable-frame-local 'scalable-fonts-allowed) (let ((frame (make-frame '((name . "SCALABLE"))))) (modify-frame-parameters frame '((scalable-fonts-allowed . t))) frame)) The patch accesses the value of `scalable-fonts-allowed' not directly by Vscalable_fonts_allowed but via: find_symbol_value (Qscalable_fonts_allowed) Is this the correct way? Shall I install it? --- Ken'ichi HANDA handa@m17n.org *** xfaces.c.~1.284.~ Tue Sep 2 08:26:41 2003 --- xfaces.c Fri Oct 24 16:48:04 2003 *************** *** 6162,6174 **** may_use_scalable_font_p (font) const char *font; { ! if (EQ (Vscalable_fonts_allowed, Qt)) return 1; ! else if (CONSP (Vscalable_fonts_allowed)) { Lisp_Object tail, regexp; ! for (tail = Vscalable_fonts_allowed; CONSP (tail); tail = XCDR (tail)) { regexp = XCAR (tail); if (STRINGP (regexp) --- 6162,6177 ---- may_use_scalable_font_p (font) const char *font; { ! Lisp_Object val; ! ! val = find_symbol_value (Qscalable_fonts_allowed); ! if (EQ (val, Qt)) return 1; ! else if (CONSP (val)) { Lisp_Object tail, regexp; ! for (tail = val; CONSP (tail); tail = XCDR (tail)) { regexp = XCAR (tail); if (STRINGP (regexp) *************** *** 6364,6370 **** } /* Try all scalable fonts before giving up. */ ! if (nfonts == 0 && ! EQ (Vscalable_fonts_allowed, Qt)) { int count = SPECPDL_INDEX (); specbind (Qscalable_fonts_allowed, Qt); --- 6367,6374 ---- } /* Try all scalable fonts before giving up. */ ! if (nfonts == 0 ! && ! EQ (find_symbol_value (Qscalable_fonts_allowed), Qt)) { int count = SPECPDL_INDEX (); specbind (Qscalable_fonts_allowed, Qt);