1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-28 01:00:52 -07:00

Tweak sh-script-mode indentation further

* lisp/progmodes/sh-script.el (sh-smie--default-backward-token):
Allow more parentheses in a token (bug#44592).
This commit is contained in:
Kévin Le Gouguec 2021-08-29 20:27:56 +02:00 committed by Lars Ingebrigtsen
parent 8fa624b39b
commit 6392bc37ab
2 changed files with 13 additions and 2 deletions

View file

@ -1775,7 +1775,7 @@ Does not preserve point."
(goto-char p)
nil))))
(while
(progn (skip-syntax-backward ".w_'")
(progn (skip-syntax-backward ".w_'()")
(or (not (zerop (skip-syntax-backward "\\")))
(when (eq ?\\ (char-before (1- (point))))
(let ((p (point)))

View file

@ -35,6 +35,17 @@
(should (equal
(buffer-substring-no-properties (point-min) (point-max))
"relative-path/to/configure --prefix=$prefix\\
--with-x"))))
--with-x")))
(with-temp-buffer
(insert "${path_to_root}/configure --prefix=$prefix\\
--with-x")
(shell-script-mode)
(goto-char (point-min))
(forward-line 1)
(indent-for-tab-command)
(should (equal
(buffer-substring-no-properties (point-min) (point-max))
"${path_to_root}/configure --prefix=$prefix\\
--with-x"))))
;;; sh-script-tests.el ends here