From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Re: Face realization (was: face-remapping patch) Date: Wed, 28 May 2008 20:54:35 +0100 Message-ID: <713B6336-4C27-46E3-8CA0-5792A2D59C94@gmail.com> References: <5CB5F5E5-9239-40A8-A3B2-5F49B94E27B7@gmail.com> <48ED0934-F46B-48C2-B664-E633554FF34A@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1212004512 12900 80.91.229.12 (28 May 2008 19:55:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 May 2008 19:55:12 +0000 (UTC) Cc: Emacs-Devel , Miles Bader To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 28 21:55:53 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K1RkH-0002Ci-68 for ged-emacs-devel@m.gmane.org; Wed, 28 May 2008 21:55:37 +0200 Original-Received: from localhost ([127.0.0.1]:54226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1RjV-0006R7-Vg for ged-emacs-devel@m.gmane.org; Wed, 28 May 2008 15:54:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K1RjR-0006Q9-Al for emacs-devel@gnu.org; Wed, 28 May 2008 15:54:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K1RjN-0006P7-2B for emacs-devel@gnu.org; Wed, 28 May 2008 15:54:44 -0400 Original-Received: from [199.232.76.173] (port=40384 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1RjM-0006P4-RE for emacs-devel@gnu.org; Wed, 28 May 2008 15:54:40 -0400 Original-Received: from ug-out-1314.google.com ([66.249.92.175]:12544) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K1RjM-0003jS-4D for emacs-devel@gnu.org; Wed, 28 May 2008 15:54:40 -0400 Original-Received: by ug-out-1314.google.com with SMTP id l31so217107ugc.48 for ; Wed, 28 May 2008 12:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=tMqGET4oDiNTegrTHEid9SlOpEAPjg+H9xWK3VQKlEo=; b=PHBCETqCe70pECZo80SNTMXs4kg/2HnCXpPqzGvYXgvdwxjN3X7+c9jJMI3cO4N+r3+dfC+vcTYW1CmWT03ST3sNrwabkZEcGXV5uTtXjdaDixLAbM3IHHacfinUA3cTOP/h1Fz+ARwR+2MddtBobCktBU4/sJFoo+vTlFqC8dc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=VdHDqgu+atvpnRpcOgiauCeN7TZfEtli5IiFMH1pPEmqSU1samzH86zwa1UBvGZrE2TU9HJrwtkMRU992nXXKbr4lMu9XV/sLyYH3M8W59RA/526NIZQkMcuOjBdGS6ywcxluo9MlGQRsjj9FPx6469ebI6lrEd0CwFCfai4Zwg= Original-Received: by 10.67.10.18 with SMTP id n18mr8986643ugi.4.1212004478676; Wed, 28 May 2008 12:54:38 -0700 (PDT) Original-Received: from scarlett.lan ( [92.19.34.98]) by mx.google.com with ESMTPS id c25sm14532783ika.11.2008.05.28.12.54.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 May 2008 12:54:37 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.919.2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:97929 Archived-At: On 28 May 2008, at 20:25, Stefan Monnier wrote: > Also, as you point out, there's a gross inefficiency in that most > faces > are really terminal-local rather than frame-local (after all, the > defface spec does not allow per-frame customizations), so we should > share the resulting realized faces. If you have a patch for it, maybe > you should post it here, Well, my patch is rather small. I simply don't run `make-face-x- resource-internal' for each frame. I think there's some way to specify the equivalent of X resources on Carbon, but that's nothing that justified the need for an operation that delayed frame creation by that much. This has worked for a lot of users since I started using it, and it sped up frame creation enormously. I really don't know anything about X, so apologies if the below trick won't work in X based environment. *** lisp/faces.el 13 Apr 2007 18:24:53 +0100 1.370 --- lisp/faces.el 13 Jul 2007 18:56:06 +0100 *************** *** 320,326 **** (defun set-face-attributes-from-resources (face frame) "Set attributes of FACE from X resources for FRAME." ! (when (memq (framep frame) '(x w32 mac)) (dolist (definition face-x-resources) (let ((attribute (car definition))) (dolist (entry (cdr definition)) --- 320,326 ---- (defun set-face-attributes-from-resources (face frame) "Set attributes of FACE from X resources for FRAME." ! (when (eq (framep frame) 'x) (dolist (definition face-x-resources) (let ((attribute (car definition))) (dolist (entry (cdr definition)) *************** *** 1789,1796 **** (condition-case () (progn (face-spec-set face (face-user-default-spec face) frame) ! (if (memq window-system '(x w32 mac)) ! (make-face-x-resource-internal face frame)) (internal-merge-in-global-face face frame)) (error nil))) ;; Apply the attributes specified by frame parameters. This --- 1789,1796 ---- (condition-case () (progn (face-spec-set face (face-user-default-spec face) frame) ! (if (eq window-system 'x) ! (make-face-x-resource-internal face frame)) (internal-merge-in-global-face face frame)) (error nil))) ;; Apply the attributes specified by frame parameters. This