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:
parent
b2838626dd
commit
7da35e6550
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue