summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Docs/cmake-mode.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/Docs/cmake-mode.el b/Docs/cmake-mode.el
index 7699cab..ea133d5 100644
--- a/Docs/cmake-mode.el
+++ b/Docs/cmake-mode.el
@@ -14,10 +14,10 @@
; Regular expressions used by line indentation function.
(defconst cmake-regex-quoted "\"\\([^\n\"\\\\]\\|\\\\.\\)*\"")
(defconst cmake-regex-arguments (concat "\\(" cmake-regex-quoted
- "\\|" "[^\n()\\\\]"
+ "\\|" "[^\n()#\\\\]"
"\\|" "\\\\."
"\\)*"))
-(defconst cmake-regex-comment "#[^\n]*")
+(defconst cmake-regex-comment "#.*")
(defconst cmake-regex-identifier "[A-Za-z][A-Za-z0-9_]*")
(defconst cmake-indent-comment-line (concat "^[ \t]*" cmake-regex-comment))
(defconst cmake-indent-blank-regex "^[ \t]*$")
@@ -29,8 +29,8 @@
")[ \t]*"
"\\(" cmake-regex-comment "\\)?"
"\n"))
-(defconst cmake-indent-begin-regex "^[ \t]*\\(IF\\|MACRO\\|FOREACH\\|ELSE\\)")
-(defconst cmake-indent-end-regex "^[ \t]*\\(ENDIF\\|ENDFOREACH\\|ENDMACRO\\|ELSE\\)")
+(defconst cmake-indent-begin-regex "^[ \t]*\\(IF\\|MACRO\\|FOREACH\\|ELSE\\)[ \t]*(")
+(defconst cmake-indent-end-regex "^[ \t]*\\(ENDIF\\|ENDFOREACH\\|ENDMACRO\\|ELSE\\)[ \t]*(")
; Line indentation function.
(defun cmake-indent ()