emacs-devel
[Top][All Lists]
Advanced

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

Re: master 67ef1d54e7e 1/2: Make c-ts-common--fill-paragraph work for ru


From: john muhl
Subject: Re: master 67ef1d54e7e 1/2: Make c-ts-common--fill-paragraph work for rust line comment
Date: Thu, 25 Apr 2024 19:55:36 -0500
User-agent: mu4e 1.10.8; emacs 30.0.50

This caused a c-ts-mode test to start failing.

  make test/lisp/progmodes/c-ts-mode-tests.log

Attachment: c-ts-mode-tests.log
Description: Text document


Yuan Fu <casouri@gmail.com> writes:

> branch: master
> commit 67ef1d54e7e3983bb03840cf8f2990d579942710
> Author: Yuan Fu <casouri@gmail.com>
> Commit: Yuan Fu <casouri@gmail.com>
>
>     Make c-ts-common--fill-paragraph work for rust line comment
>     
>     * lisp/progmodes/c-ts-common.el (c-ts-common--fill-paragraph): Back to
>     BOL before checking for //.
> ---
>  lisp/progmodes/c-ts-common.el | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el
> index 457aa55c195..c06295b8a87 100644
> --- a/lisp/progmodes/c-ts-common.el
> +++ b/lisp/progmodes/c-ts-common.el
> @@ -125,6 +125,9 @@ ARG is passed to `fill-paragraph'."
>                              (treesit-node-type node))
>          (if (save-excursion
>                (goto-char (treesit-node-start node))
> +              ;; In rust, NODE will be the body of a comment excluding
> +              ;; the //, so we need to go to BOL to check for //.
> +              (back-to-indentation)
>                (looking-at "//"))
>              (fill-comment-paragraph arg)
>            (c-ts-common--fill-block-comment arg)))


reply via email to

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