From: Eli Zaretskii <eliz@gnu.org>
To: YE <yet@ego.team>
Cc: michael_heerdegen@web.de, yet@ego.team, 56679@debbugs.gnu.org
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 [thread overview]
Message-ID: <835yjmho8k.fsf@gnu.org> (raw)
In-Reply-To: <m2mtczc5ma.fsf@ego.team> (bug-gnu-emacs@gnu.org)
> 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?
next prev parent reply other threads:[~2022-07-24 9:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 14:46 bug#56679: 28.1; whitespace-style cannot be configured for diff-mode via hook YE via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-23 0:15 ` Michael Heerdegen
2022-07-24 7:49 ` bug#56679: 28.1; [PATCH] " YE via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-24 9:02 ` Lars Ingebrigtsen
2022-07-24 9:08 ` Eli Zaretskii [this message]
2022-07-25 2:38 ` Michael Heerdegen
2022-07-25 11:07 ` Eli Zaretskii
2022-07-26 3:59 ` Michael Heerdegen
2022-07-26 12:27 ` YE via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-27 9:52 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=835yjmho8k.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=56679@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
--cc=yet@ego.team \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.