BUG: Don't open a block if a command starts with IF in its name.
This commit is contained in:
parent
1c20252908
commit
218efecd89
@ -14,10 +14,10 @@
|
|||||||
; Regular expressions used by line indentation function.
|
; Regular expressions used by line indentation function.
|
||||||
(defconst cmake-regex-quoted "\"\\([^\n\"\\\\]\\|\\\\.\\)*\"")
|
(defconst cmake-regex-quoted "\"\\([^\n\"\\\\]\\|\\\\.\\)*\"")
|
||||||
(defconst cmake-regex-arguments (concat "\\(" cmake-regex-quoted
|
(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-regex-identifier "[A-Za-z][A-Za-z0-9_]*")
|
||||||
(defconst cmake-indent-comment-line (concat "^[ \t]*" cmake-regex-comment))
|
(defconst cmake-indent-comment-line (concat "^[ \t]*" cmake-regex-comment))
|
||||||
(defconst cmake-indent-blank-regex "^[ \t]*$")
|
(defconst cmake-indent-blank-regex "^[ \t]*$")
|
||||||
@ -29,8 +29,8 @@
|
|||||||
")[ \t]*"
|
")[ \t]*"
|
||||||
"\\(" cmake-regex-comment "\\)?"
|
"\\(" cmake-regex-comment "\\)?"
|
||||||
"\n"))
|
"\n"))
|
||||||
(defconst cmake-indent-begin-regex "^[ \t]*\\(IF\\|MACRO\\|FOREACH\\|ELSE\\)")
|
(defconst cmake-indent-begin-regex "^[ \t]*\\(IF\\|MACRO\\|FOREACH\\|ELSE\\)[ \t]*(")
|
||||||
(defconst cmake-indent-end-regex "^[ \t]*\\(ENDIF\\|ENDFOREACH\\|ENDMACRO\\|ELSE\\)")
|
(defconst cmake-indent-end-regex "^[ \t]*\\(ENDIF\\|ENDFOREACH\\|ENDMACRO\\|ELSE\\)[ \t]*(")
|
||||||
|
|
||||||
; Line indentation function.
|
; Line indentation function.
|
||||||
(defun cmake-indent ()
|
(defun cmake-indent ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user