bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26969: 26.0.50; diff-changed invisible by default


From: Juri Linkov
Subject: bug#26969: 26.0.50; diff-changed invisible by default
Date: Mon, 22 May 2017 23:19:02 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (x86_64-pc-linux-gnu)

> Nowadays the `diff-changed` face is defined to be "invisible" (i.e. the
> text is displayed identically with or without that face).
> IOW it can only be used as a parent of diff-added or diff-removed (or
> some other such face).
>
> This is a bad idea since in cases such as vdiff.el where some changes
> are neither additions nor removals, it would make sense to highlight the
> buffer as just "changed" and using that face is a natural choice.
>
> I suggest the patch below for that.  It is designed such that it should
> make no visible difference to users of diff-added and diff-removed since
> these faces override the parts that are set by my patch in diff-changed.

This might break a fragile condition in ‘diff-use-changed-face’
that was created to support backward-compatibility of previously
customized faces.  But maybe it's time to simplify the logic
of diff face definitions.

> Another option would be to introduce a new face (not sure how to call
> it, maybe diff-unspecified-change, maybe?) which inherits from
> diff-changed as well.

Then authors of external packages have to wait for the next Emacs release
to start using it.

>  (defface diff-changed
> -  '((t nil))
> +  '((((class color) (min-colors 88) (background light))
> +     :background "grey90")
> +    (((class color) (min-colors 88) (background dark))
> +     :background "grey20")
> +    (((class color))
> +     :foreground "grey"))

I wonder why grey?  It used to be yellow.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]