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 <brlcad@mac.com>
This commit is contained in:
Brad King 2012-01-23 13:59:27 -05:00
parent b2838626dd
commit 7da35e6550
1 changed files with 1 additions and 0 deletions

View File

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