Subject: Re: bug#10181: 24.0.92; [wishlist] split `diff-refine-change' in several faces

From: Stefan Monnier <[email-masked]>
Date: Sun, 20 May 2012 21:45:54 -0400

>  (defface diff-removed
> -  '((t :inherit diff-changed))
> +  '((((class color) (min-colors 88))
> +     :inherit diff-changed
> +     :background "#ffdddd")
> +    (((class color))
> +     :inherit diff-changed
> +     :foreground "red"
> +     :weight normal
> +     :slant normal)
> +    (t
> +     :inherit diff-changed))

Please move the :inherit to a `default' clause instead of copying it
into each one of the clauses.

> @@ -393,7 +409,18 @@ (defvar diff-font-lock-keywords
>      ("^\\([+>]\\)\\(.*\n\\)"
>       (1 diff-indicator-added-face) (2 diff-added-face))
>      ("^\\(!\\)\\(.*\n\\)"
> -     (1 diff-indicator-changed-face) (2 diff-changed-face))
> +     (1 diff-indicator-changed-face)
> +     (2
> +      (if (not (or (face-equal diff-changed-face diff-added-face)
> +		   (face-equal diff-changed-face diff-removed-face)))

Please introduce a defvar for it, so we don't re-evaluate the face
comparison for each and every line.

> +PROPS is an alist of properties to put (via overlays) on the changes,
> +or only on removed characters when PROPS2 is non-nil.
> +PROPS2 is an alist of properties to put on added characters.

This doesn't say that PROPS will be put on the "removed" chars.

And while I'm OK with not implementing the changed-added-remove scheme
for refinement yet, I think that if we change the API of
smerge-refine-subst for the added-removed case, we should make sure the
API won't need to be changed yet again if/when we add the
changed-added-removed scheme.

        Stefan