[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56679: 28.1; [PATCH] whitespace-style cannot be configured for diff-
From: |
Eli Zaretskii |
Subject: |
bug#56679: 28.1; [PATCH] whitespace-style cannot be configured for diff-mode via hook |
Date: |
Sun, 24 Jul 2022 12:08:27 +0300 |
> Cc: yet@ego.team, 56679@debbugs.gnu.org
> Date: Sun, 24 Jul 2022 10:49:33 +0300
> From: YE via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> > I think you don't need a duplication. You can reuse an existing type
> > definition by looking up the `custom-type` symbol property of an already
> > defined option. See e.g. "lisp/eshell/em-cmpl.el" for a few example
> > definitions.
>
> Thanks for the advice.
>
> The proposed patch is attached.
Thanks.
> --- a/lisp/vc/diff-mode.el
> +++ b/lisp/vc/diff-mode.el
> @@ -56,6 +56,7 @@
> (eval-when-compile (require 'cl-lib))
> (eval-when-compile (require 'subr-x))
> (require 'easy-mmode)
> +(require 'whitespace)
Can we delay loading whitespace.el until the user actually wants to
turn on whitespace-mode, or until he/she customizes this option?
AFAIU, whitespace-mode is not turned on unconditionally by diff-mode,
so this 'require' is not needed for users who don't turn that minor
mode in Diff buffers.
> +(defcustom diff-whitespace-style '(face trailing)
> + "Specify `whitespace-style' variable for the current Diff mode buffer."
AFAIU, this style will be applied to all Diff mode buffers, not just
the "current" one. Right?
> +** Diff mode
> +
> +---
> +*** New user option 'diff-whitespace-style'.
> +This option determines buffer-local 'whitespace-style' value.
Should we tell that if someone was using whitespace-style directly for
this purpose, they should use this new option instead?
- bug#56679: 28.1; whitespace-style cannot be configured for diff-mode via hook, YE, 2022/07/21
- bug#56679: 28.1; whitespace-style cannot be configured for diff-mode via hook, Michael Heerdegen, 2022/07/22
- bug#56679: 28.1; [PATCH] whitespace-style cannot be configured for diff-mode via hook, YE, 2022/07/24
- bug#56679: 28.1; [PATCH] whitespace-style cannot be configured for diff-mode via hook, Lars Ingebrigtsen, 2022/07/24
- bug#56679: 28.1; [PATCH] whitespace-style cannot be configured for diff-mode via hook,
Eli Zaretskii <=
- bug#56679: 28.1; [PATCH] whitespace-style cannot be configured for diff-mode via hook, Michael Heerdegen, 2022/07/24
- bug#56679: 28.1; [PATCH] whitespace-style cannot be configured for diff-mode via hook, Eli Zaretskii, 2022/07/25
- bug#56679: 28.1; [PATCH] whitespace-style cannot be configured for diff-mode via hook, Michael Heerdegen, 2022/07/26
- bug#56679: 28.1; [PATCH] whitespace-style cannot be configured for diff-mode via hook, YE, 2022/07/26
- bug#56679: 28.1; [PATCH] whitespace-style cannot be configured for diff-mode via hook, Lars Ingebrigtsen, 2022/07/27