From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#33567: Syntactic fontification of diff hunks Date: Wed, 19 Dec 2018 03:35:39 +0200 Message-ID: <09b2c002-1519-61dd-6e8b-2e87794077e2@yandex.ru> References: <878t18j4is.fsf@mail.linkov.net> <83a7lobemr.fsf@gnu.org> <87a7lnv6ex.fsf@mail.linkov.net> <83pnuj9kb8.fsf@gnu.org> <875zwajh6c.fsf@mail.linkov.net> <837egpagko.fsf@gnu.org> <87k1koygvm.fsf@mail.linkov.net> <83r2ew8mfx.fsf@gnu.org> <87va475y1m.fsf@mail.linkov.net> <87mupafi73.fsf@mail.linkov.net> <834lbgh3n7.fsf@gnu.org> <87h8fduis0.fsf@mail.linkov.net> <83d0q0dtc0.fsf@gnu.org> <877eg7sq8a.fsf@mail.linkov.net> <47546098-59ef-ae43-878a-fd225b60ec99@yandex.ru> <874lba1n0n.fsf@mail.linkov.net> <87d0pyxtnc.fsf@mail.linkov.net> <532bc1dc-1b44-dc3a-23f0-f96e6d586123@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1545183248 22647 195.159.176.226 (19 Dec 2018 01:34:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Dec 2018 01:34:08 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Thunderbird/64.0 Cc: 33567@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 19 02:34:03 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZQkN-0005m6-JA for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Dec 2018 02:34:03 +0100 Original-Received: from localhost ([::1]:57202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZQmU-0006Qm-8H for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Dec 2018 20:36:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZQmN-0006Qh-Ht for bug-gnu-emacs@gnu.org; Tue, 18 Dec 2018 20:36:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZQmI-0005KP-Iv for bug-gnu-emacs@gnu.org; Tue, 18 Dec 2018 20:36:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZQmI-0005K6-A9 for bug-gnu-emacs@gnu.org; Tue, 18 Dec 2018 20:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gZQmI-0007kf-5a for bug-gnu-emacs@gnu.org; Tue, 18 Dec 2018 20:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Dec 2018 01:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33567 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33567-submit@debbugs.gnu.org id=B33567.154518335029780 (code B ref 33567); Wed, 19 Dec 2018 01:36:02 +0000 Original-Received: (at 33567) by debbugs.gnu.org; 19 Dec 2018 01:35:50 +0000 Original-Received: from localhost ([127.0.0.1]:53907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZQm5-0007kF-TL for submit@debbugs.gnu.org; Tue, 18 Dec 2018 20:35:50 -0500 Original-Received: from mail-wr1-f45.google.com ([209.85.221.45]:45229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZQm4-0007k3-9W for 33567@debbugs.gnu.org; Tue, 18 Dec 2018 20:35:48 -0500 Original-Received: by mail-wr1-f45.google.com with SMTP id t6so17650256wrr.12 for <33567@debbugs.gnu.org>; Tue, 18 Dec 2018 17:35:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2e5DoobwsdmRagR/XgxV2Sd3bXFXpzhIdl5teHZSTuc=; b=tO7O6f2opK7JrA6z82FlUrl9x9qQnDILhDwQJy9nhwPevyCg1T/z0qQxNfs/ayyiRw 8UXB7aVML8sN58zYOgZ4P5x0fEA+dxVeGinvYXlUGLOIOrlM1xiCwQbISRh1PtlgOOHG EkS0QBXV3GldzbKY2JwbQ51WaoHVU5gYPi8whyOnc5lAlXUNIvh5tsz8ZNOwLye8UM/3 hDMRLGn1pshpK8YfNwwHjy8lKry95tZ8JErSMcov1M3CPMaQvvZmnJ4tWzGQjEhdvP3d blGJPKrE15598BHLcV9JJ06qkU/ptDlo26V5MD6jVtXMJrKD/PL3V8VlifrLsPfs9Qwq UeZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2e5DoobwsdmRagR/XgxV2Sd3bXFXpzhIdl5teHZSTuc=; b=lVk9HpO4ZCWux7H7A9Ys+JOX2MRYTz3ErrFfnpAxZs7u/AL2m+QViek+O3KFZv6Kf9 cC/VJYJr/RhccdN6oWjA5Him7oLPnM7GkoPUmzDi3MOUgF+Yo2tEJQeu1C/XkzD7XEv9 pp4St1S1+thxhxsDf0UYWY407RPdltwiAX/uXb2ZxFWryCS7+nVxn5U+EViBDBBquU3s UOPT+sTxS/miRZT4LQl4g/asGtTdT97IXiH7+lZHMFd5LzblA2Jk0SxyPAzQtF1Swu5p 65El3jt+9SULiJfHF2qs/m8esyhvig4q4jYL+XbxtT/CKNY627r/EmWe8CSDDWvvh9xc zDAg== X-Gm-Message-State: AA+aEWa1smAKkTDH05oAJ7W/ThMNreadDxwrkzVj2QeK5WiDjWJ374+1 Xg8idEly8BEhUOfc4nkw9/AlvETY X-Google-Smtp-Source: AFSGD/Vj4MlIQl0wbrwAfQ3HhjRHZVK5gqL4Aafd3axJiap1ZoLt+q1sN0mdrLY5coj+vGaJeki0Hg== X-Received: by 2002:adf:e7d0:: with SMTP id e16mr17678313wrn.142.1545183342023; Tue, 18 Dec 2018 17:35:42 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id n9sm2906016wrx.80.2018.12.18.17.35.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Dec 2018 17:35:40 -0800 (PST) In-Reply-To: <532bc1dc-1b44-dc3a-23f0-f96e6d586123@yandex.ru> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:153589 Archived-At: On 19.12.2018 2:48, Dmitry Gutov wrote: > On 19.12.2018 2:11, Juri Linkov wrote: > >> Does it help to remove foreground colors from diff-added and >> diff-removed? > > Yup. Except if I customize those and restart, I think the +'s and -'s on > the left will become black as well, which is somewhat of a loss. (Maybe not on colorful enough displays, though). Anyway, to be clear, and other considerations aside, this works: diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index ed953deb21..8a41e365da 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -304,9 +304,7 @@ diff-removed (((class color) (min-colors 88) (background light)) :background "#ffdddd") (((class color) (min-colors 88) (background dark)) - :background "#553333") - (((class color)) - :foreground "red")) + :background "#553333")) "`diff-mode' face used to highlight removed lines.") (defface diff-added @@ -315,9 +313,7 @@ diff-added (((class color) (min-colors 88) (background light)) :background "#ddffdd") (((class color) (min-colors 88) (background dark)) - :background "#335533") - (((class color)) - :foreground "green")) + :background "#335533")) "`diff-mode' face used to highlight added lines.") (defface diff-changed @@ -328,7 +324,9 @@ diff-changed (defface diff-indicator-removed '((default :inherit diff-removed) (((class color) (min-colors 88)) - :foreground "#aa2222")) + :foreground "#aa2222") + (((class color)) + :foreground "red")) "`diff-mode' face used to highlight indicator of removed lines (-, <)." :version "22.1") (defvar diff-indicator-removed-face 'diff-indicator-removed) @@ -336,7 +334,9 @@ diff-indicator-removed-face (defface diff-indicator-added '((default :inherit diff-added) (((class color) (min-colors 88)) - :foreground "#22aa22")) + :foreground "#22aa22") + (((class color)) + :foreground "green")) "`diff-mode' face used to highlight indicator of added lines (+, >)." :version "22.1") (defvar diff-indicator-added-face 'diff-indicator-added)