From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry OReilly Newsgroups: gmane.emacs.bugs Subject: bug#16694: bugs #16694/#16378: Patches Date: Wed, 26 Mar 2014 19:49:29 -0400 Message-ID: References: <52F601AE.5040309@binary-island.eu> <87k3bj40nu.fsf@cougar.home.aneadesign.com> <83wqfiz36v.fsf@gnu.org> <5331D45B.7090704@binary-island.eu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2d6f89f6ec304f58b1ef8 X-Trace: ger.gmane.org 1395877812 3118 80.91.229.3 (26 Mar 2014 23:50:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Mar 2014 23:50:12 +0000 (UTC) Cc: Clemens =?UTF-8?Q?Sch=C3=BCller?= , 16694@debbugs.gnu.org To: Matthias Dahl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 27 00:50:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WSxaN-0004Y2-3h for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Mar 2014 00:50:19 +0100 Original-Received: from localhost ([::1]:50725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSxaM-0007hF-M7 for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Mar 2014 19:50:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSxaD-0007Qq-IB for bug-gnu-emacs@gnu.org; Wed, 26 Mar 2014 19:50:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSxa6-0008Gv-Rk for bug-gnu-emacs@gnu.org; Wed, 26 Mar 2014 19:50:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSxa6-0008Gb-OR for bug-gnu-emacs@gnu.org; Wed, 26 Mar 2014 19:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WSxa6-0007fA-6o for bug-gnu-emacs@gnu.org; Wed, 26 Mar 2014 19:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Barry OReilly Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Mar 2014 23:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16694 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16694-submit@debbugs.gnu.org id=B16694.139587777429414 (code B ref 16694); Wed, 26 Mar 2014 23:50:02 +0000 Original-Received: (at 16694) by debbugs.gnu.org; 26 Mar 2014 23:49:34 +0000 Original-Received: from localhost ([127.0.0.1]:51498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WSxZd-0007eJ-4w for submit@debbugs.gnu.org; Wed, 26 Mar 2014 19:49:33 -0400 Original-Received: from mail-oa0-f48.google.com ([209.85.219.48]:57518) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WSxZa-0007e9-PX for 16694@debbugs.gnu.org; Wed, 26 Mar 2014 19:49:31 -0400 Original-Received: by mail-oa0-f48.google.com with SMTP id m1so3509252oag.35 for <16694@debbugs.gnu.org>; Wed, 26 Mar 2014 16:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=X+DengQmwnoTMBMME18JavwrbLEi67tw+sMd0lSm/oM=; b=wguwGpxjwYrdCpxDhkTvcI1Q7QLNEjnktSZ9gwoUXVqY1yy2MsZZLEFlNThlfpeH1H PA/2Z2rVCG6pTdAmiuMI9wOV9mOHxuiXyqI9Wx+QlkFWYBURSAH5GWhwD4tDTr1kXobI uJ4HfL9vkYLWLka38IXSPavHj+KaCD3OnJqPjdsAm1uibVvMbIf+vC86fKwU/4yePMvg 87RO3cmA9gshQmamZMRetkjqZ8oEoXKmGfAPbzTNNyRii/AA2fjkrbdqAco2C7ty7Abp yzQ/isCbS5YK/AJ+WGt5Ibj1O6gOUPtQPTaAz04R0oC4+m9Rcsi1QINJ8RoeURhjbhdc H+Wg== X-Received: by 10.182.16.131 with SMTP id g3mr10021835obd.46.1395877769864; Wed, 26 Mar 2014 16:49:29 -0700 (PDT) Original-Received: by 10.76.6.44 with HTTP; Wed, 26 Mar 2014 16:49:29 -0700 (PDT) In-Reply-To: <5331D45B.7090704@binary-island.eu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87432 Archived-At: --001a11c2d6f89f6ec304f58b1ef8 Content-Type: text/plain; charset=ISO-8859-1 In face-set-after-frame-default, a function untouched in Chong's changes, there is: (let ((window-system-p (memq (window-system frame) '(x w32)))) [...] ;; Initialize faces from face spec and custom theme. (face-spec-recalc face frame) ;; X resources for the default face are applied during ;; `x-create-frame'. (and (not (eq face 'default)) window-system-p (make-face-x-resource-internal face frame)) But the (and (not (eq face 'default)) window-system-p ...) is completely pointless, since Chong's changes have face-spec-recalc call make-face-x-resource-internal unconditionally. On a hunch, I tried: diff --git a/lisp/faces.el b/lisp/faces.el index e008993..1150d8f 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1642,7 +1642,9 @@ then the override spec." (face-spec-set-2 face frame spec)) (setq spec (face-spec-choose (get face 'face-override-spec) frame)) (face-spec-set-2 face frame spec)) - (make-face-x-resource-internal face frame)) + (and (not (eq face 'default)) + (memq (window-system frame) '(x w32)) + (make-face-x-resource-internal face frame))) (defun face-spec-set-2 (face frame spec) "Set the face attributes of FACE on FRAME according to SPEC." with no other patches, and './src/emacs -r' worked as expected. Should face-spec-recalc take responsibility for calling make-face-x-resource-internal, or leave it to the caller as before the offending changes? A patch along those lines also allows './src/emacs -r' to work: diff --git a/lisp/faces.el b/lisp/faces.el index e008993..2f8560a 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1615,7 +1615,8 @@ function for its other effects." ;; Initialize the face if it does not exist, then recalculate. (make-empty-face face) (dolist (frame (frame-list)) - (face-spec-recalc face frame))) + (face-spec-recalc face frame) + (make-face-x-resource-internal face frame))) (defun face-spec-recalc (face frame) "Reset the face attributes of FACE on FRAME according to its specs. @@ -1641,8 +1642,7 @@ then the override spec." (setq spec (face-spec-choose (face-default-spec face) frame)) (face-spec-set-2 face frame spec)) (setq spec (face-spec-choose (get face 'face-override-spec) frame)) - (face-spec-set-2 face frame spec)) - (make-face-x-resource-internal face frame)) + (face-spec-set-2 face frame spec))) (defun face-spec-set-2 (face frame spec) "Set the face attributes of FACE on FRAME according to SPEC." Someone who knows this code better than me should decide what's The Right Thing. --001a11c2d6f89f6ec304f58b1ef8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
In face-set-after-frame-default, a function untouched in C= hong's
changes, there is:

=A0 (let ((window-system-p (memq (w= indow-system frame) '(x w32))))
[...]
=A0=A0=A0 =A0=A0=A0 ;; Init= ialize faces from face spec and custom theme.
=A0=A0=A0 =A0=A0=A0 (face-spec-recalc face frame)
=A0=A0=A0 =A0=A0=A0 ;;= X resources for the default face are applied during
=A0=A0=A0 =A0=A0=A0= ;; `x-create-frame'.
=A0=A0=A0 =A0=A0=A0 (and (not (eq face 'de= fault)) window-system-p
=A0=A0=A0 =A0=A0=A0 =A0(make-face-x-resource-int= ernal face frame))

But the

=A0 (and (not (eq face 'default)) window-system-p ..= .)

is completely pointless, since Chong's changes have face-spec= -recalc
call make-face-x-resource-internal unconditionally. On a hunch, = I
tried:

diff --git a/lisp/faces.el b/lisp/faces.el
index e008993..= 1150d8f 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1642,7 = +1642,9 @@ then the override spec."
=A0=A0=A0=A0=A0=A0 (face-spec-s= et-2 face frame spec))
=A0=A0=A0=A0 (setq spec (face-spec-choose (get face 'face-override-spec= ) frame))
=A0=A0=A0=A0 (face-spec-set-2 face frame spec))
-=A0 (make-= face-x-resource-internal face frame))
+=A0 (and (not (eq face 'defau= lt))
+=A0=A0=A0=A0=A0=A0 (memq (window-system frame) '(x w32))
+=A0=A0=A0=A0=A0=A0 (make-face-x-resource-internal face frame)))
=A0
= =A0(defun face-spec-set-2 (face frame spec)
=A0=A0 "Set the face at= tributes of FACE on FRAME according to SPEC."

with no other pat= ches, and './src/emacs -r' worked as expected.

Should face-spec-recalc take responsibility for calling
make-face-x-= resource-internal, or leave it to the caller as before the
offending cha= nges? A patch along those lines also allows './src/emacs
-r' to = work:

diff --git a/lisp/faces.el b/lisp/faces.el
index e008993..2f8560a 10= 0644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1615,7 +1615,8 @@= function for its other effects."
=A0=A0 ;; Initialize the face if = it does not exist, then recalculate.
=A0=A0 (make-empty-face face)
=A0=A0 (dolist (frame (frame-list))
-= =A0=A0=A0 (face-spec-recalc face frame)))
+=A0=A0=A0 (face-spec-recalc f= ace frame)
+=A0=A0=A0 (make-face-x-resource-internal face frame)))
= =A0
=A0(defun face-spec-recalc (face frame)
=A0=A0 "Reset the face attributes of FACE on FRAME according to its sp= ecs.
@@ -1641,8 +1642,7 @@ then the override spec."
=A0=A0=A0=A0= =A0=A0 (setq spec (face-spec-choose (face-default-spec face) frame))
=A0= =A0=A0=A0=A0=A0 (face-spec-set-2 face frame spec))
=A0=A0=A0=A0 (setq spec (face-spec-choose (get face 'face-override-spec= ) frame))
-=A0=A0=A0 (face-spec-set-2 face frame spec))
-=A0 (make-fa= ce-x-resource-internal face frame))
+=A0=A0=A0 (face-spec-set-2 face fra= me spec)))
=A0
=A0(defun face-spec-set-2 (face frame spec)
=A0=A0 "Set the face at= tributes of FACE on FRAME according to SPEC."

Someone who knows= this code better than me should decide what's The
Right Thing.
<= br>
--001a11c2d6f89f6ec304f58b1ef8--