emacs-devel
[Top][All Lists]
Advanced

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

Re: [gmane.emacs.diffs] master 2621c29: Use colors in the VC mode lines


From: Juri Linkov
Subject: Re: [gmane.emacs.diffs] master 2621c29: Use colors in the VC mode lines
Date: Mon, 07 Mar 2016 02:25:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (x86_64-pc-linux-gnu)

> - The choice of colors is somewhat arbitrary, some of them are the same,
>   and there is no inheritance other than to the base-face.

Not arbitrary, AFAICS.  There is clearly recognized natural color code:
“good” states are indicated by green, and “bad” by red.  So this definitely
is an improvement.

> - Anyone who wants the faces to just be the same has to configure every
>   single vc face except the base face

Face groups should inherit from intermediate faces, such as:

- ‘vc-state-error-face’ (red) for faces ‘vc-missing-state’,
  ‘vc-conflict-state’, ‘vc-removed-state’, ‘vc-locked-state’;

- ‘vc-state-warning-face’ (orange) for ‘vc-needs-update-state’;

- ‘vc-state-info-face’ (green) for ‘vc-locally-added-state’,
  ‘vc-edited-state’.

> From: Lars Ingebrigtsen <address@hidden>
> Subject: master 2621c29: Use colors in the VC mode lines
> Newsgroups: gmane.emacs.diffs
> To: address@hidden
> Date: Tue, 01 Mar 2016 03:25:55 +0000 (3 days, 16 hours, 52 minutes ago)
> Mail-Followup-To: address@hidden, Lars Ingebrigtsen <address@hidden>
>
> branch: master
> commit 2621c293d82c15c00d9e73a8db75d70da7d0a23b
> Author: Lars Ingebrigtsen <address@hidden>
> Commit: Lars Ingebrigtsen <address@hidden>
>
>     Use colors in the VC mode lines
>
>     * lisp/vc/vc-hooks.el: Make the mode line faces default to
>     using colors to more clearly tell the user what the status is.
> ---
>  lisp/vc/vc-hooks.el |   23 +++++++++++++++--------
>  1 files changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
> index 0c1718e..6488e53 100644
> --- a/lisp/vc/vc-hooks.el
> +++ b/lisp/vc/vc-hooks.el
> @@ -54,44 +54,51 @@
>    :group 'vc-faces)
>
>  (defface vc-needs-update-state
> -  '((default :inherit vc-state-base-face))
> +  '((default :inherit vc-state-base-face)
> +    (((class color)) :foreground "blue" :weight bold))
>    "Face for VC modeline state when the file needs update."
>    :version "25.1"
>    :group 'vc-faces)
>
>  (defface vc-locked-state
> -  '((default :inherit vc-state-base-face))
> +  '((default :inherit vc-state-base-face)
> +    (((class color)) :foreground "red"))
>    "Face for VC modeline state when the file locked."
>    :version "25.1"
>    :group 'vc-faces)
>
>  (defface vc-locally-added-state
> -  '((default :inherit vc-state-base-face))
> +  '((default :inherit vc-state-base-face)
> +    (((class color)) :foreground "ForestGreen"))
>    "Face for VC modeline state when the file is locally added."
>    :version "25.1"
>    :group 'vc-faces)
>
>  (defface vc-conflict-state
> -  '((default :inherit vc-state-base-face))
> +  '((default :inherit vc-state-base-face)
> +    (((class color)) :foreground "red" :weight bold))
>    "Face for VC modeline state when the file contains merge conflicts."
>    :version "25.1"
>    :group 'vc-faces)
>
>  (defface vc-removed-state
> -  '((default :inherit vc-state-base-face))
> +  '((default :inherit vc-state-base-face)
> +    (((class color)) :foreground "red"))
>    "Face for VC modeline state when the file was removed from the VC system."
>    :version "25.1"
>    :group 'vc-faces)
>
>  (defface vc-missing-state
> -  '((default :inherit vc-state-base-face))
> +  '((default :inherit vc-state-base-face)
> +    (((class color)) :foreground "red"))
>    "Face for VC modeline state when the file is missing from the file system."
>    :version "25.1"
>    :group 'vc-faces)
>
>  (defface vc-edited-state
> -  '((default :inherit vc-state-base-face))
> -  "Face for VC modeline state when the file is up to date."
> +  '((default :inherit vc-state-base-face)
> +    (((class color)) :foreground "ForestGreen"))
> +  "Face for VC modeline state when the file is edited."
>    :version "25.1"
>    :group 'vc-faces)
>
>
> ----------



reply via email to

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