Variable: sh-indent-after-continuation

sh-indent-after-continuation is a customizable variable defined in sh-script.el.gz.

Value

t

Documentation

If non-nil, indent relative to the continued line's beginning.

Continued lines can either be indented as "one long wrapped line" without paying attention to the actual syntactic structure, as in:

   for f \
       in a; do \
       toto; \
       done

or as lines that just don't have implicit semi-colons between them, as in:

   for f \
   in a; do \
       toto; \
   done

With always you get the former behavior whereas with nil you get the latter. With t, you get the latter as long as that would indent the continuation line deeper than the initial line.

This variable was added, or its default value changed, in Emacs 25.1.

Probably introduced at or before Emacs version 25.1.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/sh-script.el.gz
(defcustom sh-indent-after-continuation t
  "If non-nil, indent relative to the continued line's beginning.
Continued lines can either be indented as \"one long wrapped line\" without
paying attention to the actual syntactic structure, as in:

   for f \\
       in a; do \\
       toto; \\
       done

or as lines that just don't have implicit semi-colons between them, as in:

   for f \\
   in a; do \\
       toto; \\
   done

With `always' you get the former behavior whereas with nil you get the latter.
With t, you get the latter as long as that would indent the continuation line
deeper than the initial line."
  :version "25.1"
  :type '(choice
          (const :value nil    :tag "Never")
          (const :value t      :tag "Only if needed to make it deeper")
          (const :value always :tag "Always"))
  :group 'sh-indentation)