diff options
author | Brad King <brad.king@kitware.com> | 2004-08-26 18:00:57 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-08-26 18:00:57 -0400 |
commit | 419df21c06a39cbfb20db2460888f86964789618 (patch) | |
tree | 338775f630a48d80b02f95af19845a1e42ef486e /Docs | |
parent | 878609935a9e7b51139c3b7872b48c473638d0b7 (diff) | |
download | cmake-419df21c06a39cbfb20db2460888f86964789618.tar.gz |
BUG: Only count block open tokens if they are followed by an open paren.
Diffstat (limited to 'Docs')
-rw-r--r-- | Docs/cmake-mode.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Docs/cmake-mode.el b/Docs/cmake-mode.el index d3e949d55a..8f77b737b5 100644 --- a/Docs/cmake-mode.el +++ b/Docs/cmake-mode.el @@ -52,7 +52,7 @@ "\\|" "[ \t\r\n]" "\\)*")) -(defconst cmake-regex-block-open "^\\(IF\\|MACRO\\|FOREACH\\|ELSE\\)") +(defconst cmake-regex-block-open "^\\(IF\\|MACRO\\|FOREACH\\|ELSE\\)$") (defconst cmake-regex-block-close "^[ \t]*\\(ENDIF\\|ENDFOREACH\\|ENDMACRO\\|ELSE\\)[ \t]*(") (defun cmake-line-starts-inside-string () @@ -113,7 +113,10 @@ (if (string-match (concat "^" cmake-regex-paren-right "$") token) (setq cur-indent (- cur-indent cmake-tab-width)) ) - (if (string-match cmake-regex-block-open token) + (if (and + (string-match cmake-regex-block-open token) + (looking-at (concat "[ \t]*" cmake-regex-paren-left)) + ) (setq cur-indent (+ cur-indent cmake-tab-width)) ) ) |