GNU bug report logs -
#44592
In sh-script-mode, should the syntax of . and / be made symbol?
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 3 years and 344 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.