emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#71225: closed (30.0.50; [PATCH] c-ts-common-comment-indent-new-line


From: GNU bug Tracking System
Subject: bug#71225: closed (30.0.50; [PATCH] c-ts-common-comment-indent-new-line does not behave like c/c++-mode in comments)
Date: Sun, 02 Jun 2024 08:31:01 +0000

Your message dated Sun, 02 Jun 2024 11:30:34 +0300
with message-id <86wmn7n3v9.fsf@gnu.org>
and subject line Re: bug#71225: 30.0.50; [PATCH] 
c-ts-common-comment-indent-new-line does not behave like c/c++-mode in comments
has caused the debbugs.gnu.org bug report #71225,
regarding 30.0.50; [PATCH] c-ts-common-comment-indent-new-line  does not behave 
like c/c++-mode in comments
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
71225: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71225
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 30.0.50; [PATCH] c-ts-common-comment-indent-new-line does not behave like c/c++-mode in comments Date: Mon, 27 May 2024 16:09:18 +0200
Hi, 
the c-ts-common-comment-indent-new-line does not behave like c/c++-mode in 
comments. 
M-j also behaves differently in different places.

// M-j wrong behavior.
int test(int a)
{
  /** (1)
  */
  int a;

  /* (1)
  */
  int b;
  // test (1)

  int c; // blah blah
         // (3)
}

/* (2)
 */

/** (2)
*/

// (2)

If you place the cursor at the positions indicated by (1) and (2), press M-j 
the result is different and is different from what happens with c/c++-mode. 

As a bonus, the attached patch also allows single-line comments placed at the 
end of a line to be indented as in c-mode (as in "(3)")

Thank you.
V.

Attachment: 0001-tree-sitter-comment-indent-new-line-behave-more-like.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#71225: 30.0.50; [PATCH] c-ts-common-comment-indent-new-line does not behave like c/c++-mode in comments Date: Sun, 02 Jun 2024 11:30:34 +0300
> Cc: 71225@debbugs.gnu.org, Vincenzo Pupillo <v.pupillo@gmail.com>
> Date: Sun, 02 Jun 2024 10:11:27 +0200
> From:  Theodor Thornhill via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> 
> Thanks, pushed to master.

Thanks, I'm therefore closing this bug.


--- End Message ---

reply via email to

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