Просмотр исходного кода

BUG: Fixed identification of ( and ) tokens to avoid finding them in string literals.

Brad King 22 лет назад
Родитель
Сommit
ece9ae97e2
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      Docs/cmake-mode.el

+ 2 - 2
Docs/cmake-mode.el

@@ -107,10 +107,10 @@
           ; Search forward counting tokens that adjust indentation.
           ; Search forward counting tokens that adjust indentation.
           (while (re-search-forward cmake-regex-token point-start t)
           (while (re-search-forward cmake-regex-token point-start t)
             (setq token (match-string 0))
             (setq token (match-string 0))
-            (if (string-match cmake-regex-paren-left token)
+            (if (string-match (concat "^" cmake-regex-paren-left "$") token)
                 (setq cur-indent (+ cur-indent cmake-tab-width))
                 (setq cur-indent (+ cur-indent cmake-tab-width))
               )
               )
-            (if (string-match cmake-regex-paren-right token)
+            (if (string-match (concat "^" cmake-regex-paren-right "$") token)
                 (setq cur-indent (- cur-indent cmake-tab-width))
                 (setq cur-indent (- cur-indent cmake-tab-width))
               )
               )
             (if (string-match cmake-regex-block-open token)
             (if (string-match cmake-regex-block-open token)