all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mauro Aranda <maurooaranda@gmail.com>
To: 26217@debbugs.gnu.org
Cc: Martin Vath <martin@mvath.de>, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#26217: bug#2910: 23.0.60; Shell-script coloring bug
Date: Fri, 13 Oct 2023 09:07:50 -0300	[thread overview]
Message-ID: <f231090e-dd99-4533-9b77-2d9122d75689@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1703220953060.31460@lounge.imp.fu-berlin.de>

Martin Vath <martin@mvath.de> writes:

 > 1. M-x shell-script-mode
 > 2. Type: "
 > for i do echo 1; done
 > for i; do echo 1; done
 > "
 >
 > Despite both lines are correct full loops according to POSIX
 > and in fact understood by all current shells (see below),
 > this does not correspond to the indentation of emacs and
 > coloring of "do" in the first line.

This Bug Report (and the other ones merged with it) have two parts:
- No highlight for "do" in:
for i do echo 1; done

This works if using bash-ts-mode, which claims in its docstring it can
support Bash or sh.

I don't know what's the decision (if there is one) about situations like
these.  If the bugs in lang-mode are fixed by lang-ts-mode, will these
bug reports be treated as: wontfix? fixed? open in case someone wants to
spend time in lang-mode?

- Wrong indentation for lines after:
for i do echo 1; done

I took a look at this, and ISTM that giving "do" a special treatment
like sh-smie--sh-keyword-p gives to "in" might fix this, perhaps by
reusing sh-smie--sh-keyword-in-p.

I know very little about SMIE, so I'm CCing Stefan M.








  reply	other threads:[~2023-10-13 12:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22  9:10 bug#26217: 25.2; shell syntax does not know for i do Martin Vath
2023-10-13 12:07 ` Mauro Aranda [this message]
2023-10-13 16:06   ` bug#26217: bug#2910: 23.0.60; Shell-script coloring bug Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 12:44     ` Mauro Aranda
2023-10-14 14:58       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 15:01         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 16:43     ` Dmitry Gutov
2023-10-14 19:07       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-14 19:49         ` 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=f231090e-dd99-4533-9b77-2d9122d75689@gmail.com \
    --to=maurooaranda@gmail.com \
    --cc=26217@debbugs.gnu.org \
    --cc=martin@mvath.de \
    --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.