* Re: master 5ecd35555e9: Fix c-ts-common filling
[not found] ` <20240805035008.C71C3C0EFEE@vcs2.savannah.gnu.org>
@ 2024-08-07 1:23 ` Po Lu
2024-08-07 4:56 ` Yuan Fu
0 siblings, 1 reply; 2+ messages in thread
From: Po Lu @ 2024-08-07 1:23 UTC (permalink / raw)
To: emacs-devel; +Cc: Yuan Fu
Yuan Fu <casouri@gmail.com> writes:
> branch: master
> commit 5ecd35555e9e20de9717f0184f58a15d8a2e68a3
> Author: Yuan Fu <casouri@gmail.com>
> Commit: Yuan Fu <casouri@gmail.com>
>
> Fix c-ts-common filling
>
> * lisp/progmodes/c-ts-common.el:
> (c-ts-common--fill-block-comment): Exclude the last line from filling if
> it only has non-word characters like *=-.
> * test/lisp/progmodes/c-ts-mode-resources/filling.erts: Fir the
> multi-line test and add a single line test.
> ---
> lisp/progmodes/c-ts-common.el | 6 +++---
> test/lisp/progmodes/c-ts-mode-resources/filling.erts | 16 +++++++++++++++-
> 2 files changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el
> index 022d21e11a1..674623a5e61 100644
> --- a/lisp/progmodes/c-ts-common.el
> +++ b/lisp/progmodes/c-ts-common.el
> @@ -186,9 +186,9 @@ comment."
> ;; filling region.
> (when (not end-marker)
> (goto-char end)
> - (when (looking-back (rx "*/") 2)
> - (backward-char 2)
> - (skip-syntax-backward "-")
> + (forward-line 0)
> + (when (looking-at (rx (* (or (syntax whitespace) "*" "=" "-"))
> + "*/" eol))
> (setq end (point))))
This (and connected changes) produced merge conflicts between emacs-30
and master, which I have attempted to resolve so that the product
builds, but since I must confess to understanding very little of this
code, please verify that no regressions were introduced in the process.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: master 5ecd35555e9: Fix c-ts-common filling
2024-08-07 1:23 ` master 5ecd35555e9: Fix c-ts-common filling Po Lu
@ 2024-08-07 4:56 ` Yuan Fu
0 siblings, 0 replies; 2+ messages in thread
From: Yuan Fu @ 2024-08-07 4:56 UTC (permalink / raw)
To: Po Lu; +Cc: Emacs Devel
> On Aug 6, 2024, at 6:23 PM, Po Lu <luangruo@yahoo.com> wrote:
>
> Yuan Fu <casouri@gmail.com> writes:
>
>> branch: master
>> commit 5ecd35555e9e20de9717f0184f58a15d8a2e68a3
>> Author: Yuan Fu <casouri@gmail.com>
>> Commit: Yuan Fu <casouri@gmail.com>
>>
>> Fix c-ts-common filling
>>
>> * lisp/progmodes/c-ts-common.el:
>> (c-ts-common--fill-block-comment): Exclude the last line from filling if
>> it only has non-word characters like *=-.
>> * test/lisp/progmodes/c-ts-mode-resources/filling.erts: Fir the
>> multi-line test and add a single line test.
>> ---
>> lisp/progmodes/c-ts-common.el | 6 +++---
>> test/lisp/progmodes/c-ts-mode-resources/filling.erts | 16 +++++++++++++++-
>> 2 files changed, 18 insertions(+), 4 deletions(-)
>>
>> diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el
>> index 022d21e11a1..674623a5e61 100644
>> --- a/lisp/progmodes/c-ts-common.el
>> +++ b/lisp/progmodes/c-ts-common.el
>> @@ -186,9 +186,9 @@ comment."
>> ;; filling region.
>> (when (not end-marker)
>> (goto-char end)
>> - (when (looking-back (rx "*/") 2)
>> - (backward-char 2)
>> - (skip-syntax-backward "-")
>> + (forward-line 0)
>> + (when (looking-at (rx (* (or (syntax whitespace) "*" "=" "-"))
>> + "*/" eol))
>> (setq end (point))))
>
> This (and connected changes) produced merge conflicts between emacs-30
> and master, which I have attempted to resolve so that the product
> builds, but since I must confess to understanding very little of this
> code, please verify that no regressions were introduced in the process.
Yes, sorry for the trouble. Your change is correct!
Yuan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-07 4:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <172282980799.32577.17823414050456920@vcs2.savannah.gnu.org>
[not found] ` <20240805035008.C71C3C0EFEE@vcs2.savannah.gnu.org>
2024-08-07 1:23 ` master 5ecd35555e9: Fix c-ts-common filling Po Lu
2024-08-07 4:56 ` Yuan Fu
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.