From: Alan Mackenzie <acm@muc.de>
To: Gregory Heytings <gregory@heytings.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
Stefan Monnier <monnier@iro.umontreal.ca>,
emacs-devel@gnu.org
Subject: Re: master 2399541: Remove font-lock toggle from font-lock-update
Date: Thu, 25 Mar 2021 11:00:56 +0000 [thread overview]
Message-ID: <YFxtaB0eZwvKQBMb@ACM> (raw)
In-Reply-To: <fa05cc978285b7b0a091@heytings.org>
Hello, Gregory.
There's an unnecessary vagueness in your proposed doc string for
font-lock-dwim.
On Thu, Mar 25, 2021 at 10:14:06 +0000, Gregory Heytings wrote:
[ .... ]
> -(defun font-lock-update (&optional arg)
> +(defun font-lock-dwim (&optional arg)
> "Updates the syntax highlighting in this buffer.
> -Refontify the accessible portion of this buffer, or enable Font Lock mode
> -in this buffer if it is currently disabled. With prefix ARG, toggle Font
> -Lock mode."
> +Enable Font Lock mode if it is disabled. Otherwise, refontify the region
> +if it is active, or a large part of the accessible portion of the buffer.
> +With prefix ARG, toggle Font Lock mode." <===========================
> (interactive "P")
> (save-excursion
> (if (and (not arg) font-lock-mode)
> - (font-lock-fontify-region (point-min) (point-max))
> + (if (use-region-p)
> + (font-lock-fontify-region (region-beginning) (region-end))
> + (font-lock-flush (point-min) (point-max))
> + (font-lock-fontify-region (max (point-min) (- (point) 50000))
> + (min (point-max) (+ (point) 50000))))
> (font-lock-unfontify-region (point-min) (point-max))
> (font-lock-mode 'toggle))))
I think the sentence should read:
With prefix ARG, INSTEAD toggle Font Lock mode.
.. The other meaning would be captured by:
With prefix ARG, ALSO toggle Font Lock mode.
.. Please consider amending the doc string accordingly.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2021-03-25 11:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210324143048.23515.75257@vcs0.savannah.gnu.org>
[not found] ` <20210324143050.40C6E20D10@vcs0.savannah.gnu.org>
2021-03-24 15:23 ` master 2399541: Remove font-lock toggle from font-lock-update Stefan Monnier
2021-03-24 15:28 ` Lars Ingebrigtsen
2021-03-24 15:47 ` Stefan Monnier
2021-03-24 15:29 ` Paul W. Rankin via Emacs development discussions.
2021-03-24 15:32 ` Gregory Heytings
2021-03-24 15:43 ` Lars Ingebrigtsen
2021-03-24 16:03 ` Lars Ingebrigtsen
2021-03-24 17:43 ` Paul W. Rankin via Emacs development discussions.
2021-03-24 17:49 ` Lars Ingebrigtsen
2021-03-24 22:07 ` Stefan Monnier
2021-03-24 22:27 ` Gregory Heytings
2021-03-25 13:52 ` Stefan Monnier
2021-03-25 20:58 ` Gregory Heytings
2021-03-25 22:39 ` Stefan Monnier
2021-03-29 9:44 ` Gregory Heytings
2021-03-29 13:00 ` Stefan Monnier
2021-03-29 14:40 ` Gregory Heytings
2021-03-29 15:50 ` Stefan Monnier
2021-03-25 9:09 ` Lars Ingebrigtsen
2021-03-25 10:14 ` Gregory Heytings
2021-03-25 11:00 ` Alan Mackenzie [this message]
2021-03-25 2:07 ` Paul W. Rankin via Emacs development discussions.
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=YFxtaB0eZwvKQBMb@ACM \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=gregory@heytings.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
/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.