all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: Eli Zaretskii <eliz@gnu.org>, 61923@debbugs.gnu.org, snyssfx@posteo.net
Subject: bug#61923: 30.0.50; go-ts-mode, multiline raw-string-literal wrong indentation
Date: Sat, 4 Mar 2023 01:28:13 -0800	[thread overview]
Message-ID: <2F96F083-69D6-4292-ACBE-A6EC07FB4398@gmail.com> (raw)
In-Reply-To: <1d59dc78-1480-9690-204c-317d552c4b90@yandex.ru>



> On Mar 3, 2023, at 3:50 PM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> 
> On 04/03/2023 00:29, Yuan Fu wrote:
>> In general we shouldn’t mess with indentation inside of multi-line strings,
>> Let me see what go-ts-mode is doing.
> 
> This seems to work:
> 
> diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el
> index e8f93d14744..1857c67bb82 100644
> --- a/lisp/progmodes/go-ts-mode.el
> +++ b/lisp/progmodes/go-ts-mode.el
> @@ -71,6 +71,7 @@ go-ts-mode--indent-rules
>      ((node-is "]") parent-bol 0)
>      ((node-is "}") parent-bol 0)
>      ((node-is "labeled_statement") no-indent)
> +     ((parent-is "raw_string_literal") no-indent)
>      ((parent-is "argument_list") parent-bol go-ts-mode-indent-offset)
>      ((parent-is "block") parent-bol go-ts-mode-indent-offset)
>      ((parent-is "communication_case") parent-bol go-ts-mode-indent-offset)
> 

Thanks, I made the change accordingly. And it works great!

Yuan




  reply	other threads:[~2023-03-04  9:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 17:16 bug#61923: 30.0.50; go-ts-mode, multiline raw-string-literal wrong indentation Gleb Zakharov
2023-03-03  7:04 ` Eli Zaretskii
     [not found]   ` <87fsam3wk7.fsf@posteo.net>
2023-03-03 11:38     ` Eli Zaretskii
2023-03-03 14:38       ` Gleb Zakharov
2023-03-03 11:39 ` Gleb Zakharov
2023-03-03 22:29 ` Yuan Fu
2023-03-03 23:50   ` Dmitry Gutov
2023-03-04  9:28     ` Yuan Fu [this message]
2023-03-04 17:39     ` Gleb Zakharov
2023-11-26 15:47       ` Jens Schmidt via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-26 16:37         ` Dmitry Gutov

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=2F96F083-69D6-4292-ACBE-A6EC07FB4398@gmail.com \
    --to=casouri@gmail.com \
    --cc=61923@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=snyssfx@posteo.net \
    /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.