Browse Source

cmake-mode.el: Indent after multiline argument (#12908)

After a multiline argument ending in a non-empty line e.g.

 if(TEST)
   set(VAR "
 ...")
   unset(VAR)
 endif()

we previously failed to indent following lines like the "unset".  Use
cmake-line-starts-inside-string to keep walking back through multiline
arguments until we find an indented line.

Suggested-by: Christopher Sean Morrison <[email protected]>
Brad King 14 years ago
parent
commit
7da35e6550
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Docs/cmake-mode.el

+ 1 - 0
Docs/cmake-mode.el

@@ -99,6 +99,7 @@ set the path with these commands:
     (setq region (buffer-substring-no-properties (point) point-start))
     (while (and (not (bobp))
                 (or (looking-at cmake-regex-blank)
+                    (cmake-line-starts-inside-string)
                     (not (and (string-match cmake-regex-indented region)
                               (= (length region) (match-end 0))))))
       (forward-line -1)