all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matthias Dahl <ml_emacs-lists@binary-island.eu>
To: Barry OReilly <gundaetiapo@gmail.com>
Cc: 16694@debbugs.gnu.org, 16434@debbugs.gnu.org,
	"Clemens Schüller" <cs.mlists+bug-gnu-emacs@mailbox.org>
Subject: bug#16434: bug#16694: bugs #16694/#16378: Patches
Date: Wed, 02 Apr 2014 20:36:08 +0200	[thread overview]
Message-ID: <533C5898.9000200@binary-island.eu> (raw)
In-Reply-To: <CAFM41H3K_rc=brO-kH7rtjpOkTMVLhEgZNVS6PSuH2bqwTQKjw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]

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

[-- Attachment #2: 0004-lisp-faces.el-Fix-reverse-video-for-X-window-system.patch --]
[-- Type: text/x-patch, Size: 2339 bytes --]

From 921a907b9ccf990bb0885160fde37a173d237c22 Mon Sep 17 00:00:00 2001
From: Matthias Dahl <matthias.dahl@binary-island.eu>
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)))))
 
 
 \f
@@ -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


  reply	other threads:[~2014-04-02 18:36 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-08 10:06 bug#16694: Regression by commit 115663 (bzr): Theme face attributes no longer take precedence over X resources Matthias Dahl
2014-02-12 22:21 ` Glenn Morris
2014-02-14 19:17   ` Matthias Dahl
2014-02-20 18:27     ` Eli Zaretskii
2014-02-20 21:47       ` Stefan Monnier
2014-02-21  9:07         ` Eli Zaretskii
2014-02-21 17:36           ` Stefan Monnier
2014-02-23 16:46           ` Matthias Dahl
2014-02-23 17:18             ` Eli Zaretskii
2014-02-24 19:29               ` Matthias Dahl
2014-02-26 15:49                 ` bug#16378: Empty face settings ignored (was bug#16694: Regression by commit 115663 (bzr): Theme face attributes no longer take precedence over X resources) Stefan Monnier
2014-02-27 19:05                   ` Matthias Dahl
2014-03-02 14:26                   ` Matthias Dahl
2014-03-02 16:56                     ` Eli Zaretskii
2014-03-05 16:14 ` bug#16694: bugs #16694/#16378: Patches Matthias Dahl
2014-03-16 19:13   ` bug#16378: " Matthias Dahl
2014-03-17 14:33     ` Eli Zaretskii
2014-03-21 18:05 ` bug#16694: " Barry OReilly
2014-03-22  8:30   ` Eli Zaretskii
2014-03-23 17:04     ` Matthias Dahl
2014-03-24 23:42 ` Barry OReilly
2014-03-24 23:49   ` Clemens Schüller
2014-03-25 14:17     ` Barry OReilly
2014-03-25 15:51       ` Eli Zaretskii
2014-03-25 16:17         ` Barry OReilly
2014-03-25 19:09           ` Matthias Dahl
2014-03-26 23:49             ` Barry OReilly
2014-03-27 14:22               ` Stefan Monnier
2014-03-28 14:59                 ` Barry OReilly
2014-03-28 15:15                   ` bug#16434: " Matthias Dahl
2014-04-01 17:15                     ` Barry OReilly
2014-04-01 18:17                       ` Matthias Dahl
2014-04-02 15:04                       ` Matthias Dahl
2014-04-02 16:47                         ` Barry OReilly
2014-04-02 18:36                           ` Matthias Dahl [this message]
2014-04-02 19:34                             ` Barry OReilly
2014-04-05  7:52                         ` bug#16378: " Eli Zaretskii
2014-04-05 15:48                           ` Stefan Monnier
2014-04-05 16:15                             ` Eli Zaretskii
2014-04-07  9:58                               ` bug#16434: " Matthias Dahl
2014-04-09  9:49                               ` Matthias Dahl
2014-04-12 11:37                                 ` bug#16378: " Matthias Dahl
2014-04-12 14:32                                   ` Eli Zaretskii
2014-04-12 14:57                                     ` Matthias Dahl
2014-04-23 15:51                                       ` bug#16434: " Eli Zaretskii
2014-04-23 18:11                                         ` Matthias Dahl
2014-04-24  0:36                                           ` Stefan Monnier
2014-04-27  8:22                                             ` Matthias Dahl
2014-04-28 16:38                                               ` Eli Zaretskii
2014-04-28 18:36                                                 ` Matthias Dahl
2014-04-28 19:18                                                   ` Eli Zaretskii
2014-04-30 18:34                                                     ` Matthias Dahl
2014-03-26 15:30           ` Eli Zaretskii
2014-03-26 16:03             ` Glenn Morris
2014-03-26 13:39 ` bug#16694: Strange background color problem in gentoo Linux Barry OReilly
2014-03-26 15:11   ` Joakim Tjernlund
2014-03-26 16:49     ` Barry OReilly
2014-03-26 18:12       ` bug#16694: Strange background color problem in gentoo GNU/Linux Joakim Tjernlund
2014-03-26 15:58   ` bug#16694: Strange background color problem in gentoo Linux Clemens Schüller
2014-03-26 18:18     ` Joakim Tjernlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=533C5898.9000200@binary-island.eu \
    --to=ml_emacs-lists@binary-island.eu \
    --cc=16434@debbugs.gnu.org \
    --cc=16694@debbugs.gnu.org \
    --cc=cs.mlists+bug-gnu-emacs@mailbox.org \
    --cc=gundaetiapo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.