Variable: dtrt-indent-language-syntax-table

dtrt-indent-language-syntax-table is a variable defined in dtrt-indent.el.

Value

((c/c++/java ("\"" 0 "\"" nil "\\\\.") ("'" 0 "'" nil "\\\\.")
	     ("/\\*" 0 "\\*/" nil) ("//" 0 "$" nil) ("(" 0 ")" t)
	     ("\\[" 0 "\\]" t))
 (javascript ("\"" 0 "\"" nil "\\\\.") ("'" 0 "'" nil "\\\\.")
	     ("/\\*" 0 "\\*/" nil) ("//" 0 "$" nil)
	     ("/\\(.*\\)" 1 "\\1/" nil) ("\\[" 0 "\\]" t))
 (perl ("\"" 0 "\"" nil "\\\\.") ("'" 0 "'" nil "\\\\.")
       ("/" 0 "/" nil "\\\\.") ("#" 0 "$" nil) ("(" 0 ")" t)
       ("\\[" 0 "\\]" t))
 (lua ("\"" 0 "\"" nil "\\\\.") ("'" 0 "'" nil "\\\\.")
      ("--" 0 "$" nil) ("(" 0 ")" t)
      ("\\[\\(=+\\)\\[" 1 "\\]\\1\\]" nil) ("{" 0 "}" t))
 (ruby ("\"" 0 "\"" nil "\\\\.") ("'" 0 "'" nil "\\\\.")
       ("/" 0 "/" nil "\\\\.") ("#" 0 "$" nil) ("(" 0 ")" t)
       ("\\[" 0 "\\]" t) ("{" 0 "}" t))
 (ada ("\"" 0 "\"" nil "\\\\.") ("--" 0 "$" nil) ("(" 0 ")" t)
      ("\\[" 0 "\\]" t) ("{" 0 "}" t))
 (erlang ("\"" 0 "\"" nil "\\\\.") ("[<][<][<]" 0 "$" nil)
	 ("[<][<]" 0 "[>][>]" nil) ("%" 0 "$" nil) ("^-" 0 "\\." nil)
	 ("{" 0 "}" t) ("\\[" 0 "\\]" t) ("(" 0 ")" t)
	 ("\\_<\\(?:begin\\|case\\|fun\\|if\\|receive\\|try\\)\\_>" 0
	  "\\_<end\\_>" t))
 (css ("\"" 0 "\"" nil "\\\\.") ("'" 0 "'" nil "\\\\.")
      ("/\\*" 0 "\\*/" nil))
 (sgml ("[<]!\\[(CDATA|IGNORE|RCDATA)\\[" 0 "\\]\\][>]" nil)
       ("[<]!--" 0 "[^-]--[>]" nil))
 (cmake ("\"" 0 "\"" nil "\\\\.")
	("#\\[\\(=*\\)\\[" 1 "\\]\\1\\]" nil) ("#" 0 "$" nil))
 (default ("\"" 0 "\"" nil "\\\\.")))

Documentation

A list of syntax tables for supported languages.

Each entry in this list is of the form

   (SYMBOL SYNTAX-ENTRY [SYNTAX-ENTRY [...]])

where SYMBOL is used to identify the language in question and SYNTAX-ENTRY is in format

   (BEGIN-REGEXP NUM-GROUPS END-REGEXP RECURSIVE-P SKIP-REGEXP)

BEGIN-REGEXP is a regular expression matching the beginning of the syntax construct in question. NUM-GROUPS indicates how many groups there are in BEGIN-REGEXP to be substituted in END-REGEXP.

END-REGEXP is a regular expression matching the end of the syntax construct in question. It can refer back to one group in BEGIN-REGEXP using \1. Currently only one group is supported (\2 cannot be used.)

RECURSIVE-P indicates whether other syntax constructs can be nested within this construct. RECURSIVE-P is usually false for comment and constant constructs, such as strings, and usually true for bracketing constructs.

SKIP-REGEXP is a regular expression that, if matches, means that END-REGEXP is ignored for that location. This can be used to prevent an escaped quote from being interpreted as the closing quote, for example.

Source Code

;; Defined in /nix/store/xl774j723v677bsfsybzln3vi6w0fpm3-emacs-packages-deps/share/emacs/site-lisp/elpa/dtrt-indent-20260709.2011/dtrt-indent.el
(defvar dtrt-indent-language-syntax-table
  '((c/c++/java ("\""                    0   "\""       nil "\\\\.")
                ("'"                     0   "'"        nil "\\\\.")
                ("/\\*"                  0   "\\*/"     nil)
                ("//"                    0   "$"        nil)
                ("("                     0   ")"        t)
                ("\\["                   0   "\\]"      t))

    ;; Same as c/c++/java but ignore function call arguments, to cope with
    ;; modules defined entirely within a function call, e.g. AMD style
    (javascript ("\""                    0   "\""       nil "\\\\.")
                ("'"                     0   "'"        nil "\\\\.")
                ("/\\*"                  0   "\\*/"     nil)
                ("//"                    0   "$"        nil)
                ("/\\(.*\\)"             1   "\\1/"     nil)
                ("\\["                   0   "\\]"      t))

    (perl       ("\""                    0   "\""       nil "\\\\.")
                ("'"                     0   "'"        nil "\\\\.")
                ("/"                     0   "/"        nil "\\\\.")
                ("#"                     0   "$"        nil)
                ("("                     0   ")"        t)
                ("\\["                   0   "\\]"      t))

    (lua        ("\""                    0   "\""       nil "\\\\.")
                ("'"                     0   "'"        nil "\\\\.")
                ("--"                    0   "$"        nil)
                ("("                     0   ")"        t)
                ("\\[\\(=+\\)\\["        1   "\\]\\1\\]"     nil)
                ("{"                     0   "}"        t))

    (ruby       ("\""                    0   "\""       nil "\\\\.")
                ("'"                     0   "'"        nil "\\\\.")
                ("/"                     0   "/"        nil "\\\\.")
                ("#"                     0   "$"        nil)
                ("("                     0   ")"        t)
                ("\\["                   0   "\\]"      t)
                ("{"                     0   "}"        t))

    (ada        ("\""                    0   "\""       nil "\\\\.")
                ("--"                    0   "$"        nil)
                ("("                     0   ")"        t)
                ("\\["                   0   "\\]"      t)
                ("{"                     0   "}"        t))

    ;; The standard Erlang style is to indent code inside a block
    ;; relative to the token that opened the block.  For example:
    ;;
    ;; bar(X) ->
    ;;   {A, B} = case X of
    ;;              true ->
    ;;                {alpha, [beta,
    ;;                         gamma]}
    ;;            end.
    ;;
    ;; Thus it is best to ignore the code inside these block
    ;; constructs when determining the indent offset.
    (erlang     ("\""                    0   "\""       nil "\\\\.")
                ;; next pattern avoids error on git merge conflict lines
                ("[<][<][<]"             0   "$"        nil)
                ("[<][<]"                0   "[>][>]"   nil)
                ("%"                     0   "$"        nil)
                ("^-"                    0   "\\."      nil)
                ("{"                     0   "}"        t)
                ("\\["                   0   "\\]"      t)
                ("("                     0   ")"        t)
                ("\\_<\\(?:begin\\|case\\|fun\\|if\\|receive\\|try\\)\\_>"
                 0   "\\_<end\\_>" t))

    (css        ("\""                    0   "\""       nil "\\\\.")
                ("'"                     0   "'"        nil "\\\\.")
                ("/\\*"                  0   "\\*/"   nil))

    (sgml       ("[<]!\\[(CDATA|IGNORE|RCDATA)\\["
                 0   "\\]\\][>]"     nil)
                ("[<]!--"                0   "[^-]--[>]"  nil))

    (cmake      ("\""                    0   "\""        nil "\\\\.")
                ("#\\[\\(=*\\)\\["       1   "\\]\\1\\]" nil)
                ("#"                     0   "$"         nil))

    (default    ("\""                    0   "\""       nil "\\\\.")))

  "A list of syntax tables for supported languages.

Each entry in this list is of the form

   (SYMBOL SYNTAX-ENTRY [SYNTAX-ENTRY [...]])

where SYMBOL is used to identify the language in
question and SYNTAX-ENTRY is in format

   (BEGIN-REGEXP NUM-GROUPS END-REGEXP RECURSIVE-P SKIP-REGEXP)

BEGIN-REGEXP is a regular expression matching the beginning of
the syntax construct in question.  NUM-GROUPS indicates how many
groups there are in BEGIN-REGEXP to be substituted in END-REGEXP.

END-REGEXP is a regular expression matching the end of the syntax
construct in question.  It can refer back to one group in
BEGIN-REGEXP using \\1. Currently only one group is supported (\\2
cannot be used.)

RECURSIVE-P indicates whether other syntax constructs can be
nested within this construct.  RECURSIVE-P is usually false for
comment and constant constructs, such as strings, and usually
true for bracketing constructs.

SKIP-REGEXP is a regular expression that, if matches, means that
END-REGEXP is ignored for that location.  This can be used to
prevent an escaped quote from being interpreted as the closing
quote, for example.")