unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44592: In sh-script-mode, should the syntax of . and / be made symbol?
@ 2020-11-12 13:49 Dario Gjorgjevski
  2020-11-14 16:44 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Dario Gjorgjevski @ 2020-11-12 13:49 UTC (permalink / raw)
  To: 44592

In the syntax table of sh-script-mode, the syntax of . and / is
punctuation.  This has the advantage of being able to use, e.g.,
kill-sexp to kill one component of a path.  However, it also has the
disadvantage of not correctly indenting line continuations when a path
to a command is given.

As an example, consider:

    relative-path/to/configure --prefix=$prefix             \
                               --with-x                     \
                               --with-x-toolkit=gtk3        \
                               --with-cairo

(This is how I would expect it to be indented.)  Currently,
sh-script-mode would consider only relative-path to be the first sexp on
the leading line and therefore indent it as:

    relative-path/to/configure --prefix=$prefix     \
                 --with-x                           \
                 --with-x-toolkit=gtk3              \
                 --with-cairo

Changing the syntax of . and / to symbol would make the entire
relative-path/to/configure be considered the first sexp and therefore
give the correct indentation show above.

Moreover, one would then be able to use, e.g., kill-sexp to kill a full
path as opposed to just one component.

What do you think?  Alternatively, we could work on fixing only the
SMIE-provided indentation and leave the syntax as it is.

Best regards,
Dario

-- 
$ keyserver=hkps://hkps.pool.sks-keyservers.net
$ keyid=744A4F0B4F1C9371
$ gpg --keyserver $keyserver --search-keys $keyid





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-29 21:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 13:49 bug#44592: In sh-script-mode, should the syntax of . and / be made symbol? Dario Gjorgjevski
2020-11-14 16:44 ` Lars Ingebrigtsen
2020-12-23 16:05   ` Dario Gjorgjevski
2020-12-23 22:24     ` Lars Ingebrigtsen
2020-12-24  3:59       ` Stefan Monnier
2021-08-27 17:09         ` Lars Ingebrigtsen
2021-08-28  9:44           ` Kévin Le Gouguec
2021-08-29 18:29             ` Lars Ingebrigtsen
2021-08-29 21:22               ` Kévin Le Gouguec

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).