From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthias Dahl Newsgroups: gmane.emacs.bugs Subject: bug#16434: bug#16694: bugs #16694/#16378: Patches Date: Wed, 02 Apr 2014 20:36:08 +0200 Message-ID: <533C5898.9000200@binary-island.eu> References: <52F601AE.5040309@binary-island.eu> <87k3bj40nu.fsf@cougar.home.aneadesign.com> <83wqfiz36v.fsf@gnu.org> <5331D45B.7090704@binary-island.eu> <5335920F.4030008@binary-island.eu> <533C26F3.4040600@binary-island.eu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020509080507060603070803" X-Trace: ger.gmane.org 1396523598 18303 80.91.229.3 (3 Apr 2014 11:13:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Apr 2014 11:13:18 +0000 (UTC) Cc: 16694@debbugs.gnu.org, 16434@debbugs.gnu.org, Clemens =?UTF-8?Q?Sch=C3=BCller?= To: Barry OReilly Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 03 13:13:12 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 1WVeJf-00075K-PG for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Apr 2014 11:52:11 +0200 Original-Received: from localhost ([::1]:40157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVQ2J-0007ou-GA for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Apr 2014 14:37:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVQ2A-0007oh-Ao for bug-gnu-emacs@gnu.org; Wed, 02 Apr 2014 14:37:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVQ24-0004cB-4M for bug-gnu-emacs@gnu.org; Wed, 02 Apr 2014 14:37:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVQ24-0004c5-1E for bug-gnu-emacs@gnu.org; Wed, 02 Apr 2014 14:37:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WVQ22-0002SP-N2 for bug-gnu-emacs@gnu.org; Wed, 02 Apr 2014 14:37:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matthias Dahl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Apr 2014 18:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16434 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16434-submit@debbugs.gnu.org id=B16434.13964637779347 (code B ref 16434); Wed, 02 Apr 2014 18:37:02 +0000 Original-Received: (at 16434) by debbugs.gnu.org; 2 Apr 2014 18:36:17 +0000 Original-Received: from localhost ([127.0.0.1]:33263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVQ1H-0002Qf-Ao for submit@debbugs.gnu.org; Wed, 02 Apr 2014 14:36:15 -0400 Original-Received: from hemera.binary-island.eu ([97.107.138.233]:53510) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WVQ1D-0002QR-ID; Wed, 02 Apr 2014 14:36:12 -0400 Original-Received: from [10.0.0.20] (95-90-43-88-dynip.superkabel.de [95.90.43.88]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by hemera.binary-island.eu (Postfix) with ESMTPSA id DE0E73C0D5; Wed, 2 Apr 2014 14:42:33 -0400 (EDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: 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:87658 Archived-At: This is a multi-part message in MIME format. --------------020509080507060603070803 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello Barry, I'm on the run but I wanted to answer you this very day, so please excuse my brief mail. :( > Patch 3 undoes something patch 1 introduced, perhaps because you > intended a subset of the patches for the emacs-24 branch and the rest > for trunk? Could you clarify that? Thanks for taking a closer look. :) I usually write small contained patches which work iteratively together which makes it a lot easier to track down bugs at a later stage with git bisect or whatever. So sometimes patch x introduces something that is needed for problem x which patch x+1 slightly modifies or revises to solve problem x+1. :) > For my information, could you confirm the effect my patch has on your > theme problem? I'm sorry but you lost me there. Could you please elaborate more what it is you want me to comment on? Sorry... and thanks. Last but not least: Attached you find a new patch for the problem which is still the fourth in the series but since the last 3 haven't changed, those are omitted from this mail but still required. The patch basically restores the behavior (wrt reverse video) to what Emacs 24.3 did without undoing any of the other work and fixes. I've tested everything as far as I could and all your test cases work just fine on my machine. I hope this one is a keeper. Thanks for testing and your patience. Again, sorry for the short mail. So long, Matthias -- Dipl.-Inf. (FH) Matthias Dahl | Software Engineer | binary-island.eu services: custom software [desktop, mobile, web], server administration --------------020509080507060603070803 Content-Type: text/x-patch; name="0004-lisp-faces.el-Fix-reverse-video-for-X-window-system.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0004-lisp-faces.el-Fix-reverse-video-for-X-window-system.pat"; filename*1="ch" >From 921a907b9ccf990bb0885160fde37a173d237c22 Mon Sep 17 00:00:00 2001 From: Matthias Dahl Date: Wed, 2 Apr 2014 15:50:42 +0200 Subject: [PATCH 4/4] lisp/faces.el: Fix reverse-video for X window system During frame creation, the initial values for the default face are set-- including swapped fg/bg colors in the reverse-video case. Commit 15e14b165dcbc6566a0459b0d5e66f89080f569e introduced a bug that overwrote those defaults by accident. Previously: If reverse-video was active, the default face was no longer synced with any X resources. The aforementioned commit placed make-face-x-resource-internal in face-spec-recalc and called it unconditionally there, which overwrote, amongst other things, the proper set defaults. To fix this, make-face-x-resource-internal now makes sure that it doesn't touch the default face if reversed video is given-- as it was done previously. Fixes bug #16434. --- lisp/faces.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index 28205d2..f14ffc7 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -354,10 +354,12 @@ FRAME nil or not specified means do it for all frames. If `inhibit-x-resources' is t, this will do nothing." (unless inhibit-x-resources - (if (null frame) - (dolist (frame (frame-list)) - (set-face-attributes-from-resources face frame)) - (set-face-attributes-from-resources face frame)))) + (dolist (frame (if (null frame) (frame-list) (list frame))) + ;; `x-create-frame' already took care of correctly handling + ;; the reverse video case-- do _not_ touch the default face + (unless (and (eq face 'default) + (frame-parameter frame 'reverse)) + (set-face-attributes-from-resources face frame))))) @@ -2063,10 +2065,6 @@ frame parameters in PARAMETERS." (progn ;; 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)) ;; Apply attributes specified by face-new-frame-defaults (internal-merge-in-global-face face frame)) ;; Don't let invalid specs prevent frame creation. -- 1.9.1 --------------020509080507060603070803--