diff --git a/plantuml-mode.el b/plantuml-mode.el index 5d471b6..6072e3e 100644 --- a/plantuml-mode.el +++ b/plantuml-mode.el @@ -343,8 +343,8 @@ Uses prefix (as PREFIX) to choose where to display it: (defvar plantuml-keywords-regexp (concat "^\\s *" (regexp-opt plantuml-keywords 'words) "\\|\\(<\\|<|\\|\\*\\|o\\)\\(\\.+\\|-+\\)\\|\\(\\.+\\|-+\\)\\(>\\||>\\|\\*\\|o\\)\\|\\.\\{2,\\}\\|-\\{2,\\}")) (defvar plantuml-builtins-regexp (regexp-opt plantuml-builtins 'words)) (defvar plantuml-preprocessors-regexp (concat "^\\s *" (regexp-opt plantuml-preprocessors 'words))) - (defvar plantuml-indent-regexp-start "^[ \t]*\\(\\(?:.*\\)?\s*\\(?:[<>.*a-z-|]+\\)?\s*\\(?:\\[[a-zA-Z]+\\]\\)?\s+if\\|alt\\|else\\|note\s+over\\|note\sas\s.*\\|note\s+\\(\\(?:\\(?:buttom\\|left\\|right\\|top\\)\\)\\)\\(?:\s+of\\)?\\|\\(?:class\\|enum\\|package\\)\s+.*{\\)") - (defvar plantuml-indent-regexp-end "^[ \t]*\\(endif\\|else\\|end\\|end\s+note\\|.*}\\)") + (defvar plantuml-indent-regexp-start "^[ \t]*\\(\\(?:.*\\)?\s*\\(?:[<>.*a-z-|]+\\)?\s*\\(?:\\[[a-zA-Z]+\\]\\)?\s+if\\|loop\s+.*\\|group\s+.*\\|par\s+\\|opt\s+.*\\|alt\s+.*\\|else\s+.*\\|note\s+over\\|note\sas\s.*\\|note\s+\\(\\(?:\\(?:buttom\\|left\\|right\\|top\\)\\)\\)\\(?:\s+of\\)?\\|\\(?:class\\|enum\\|package\\)\s+.*{\\|activate\s+.*\\)") + (defvar plantuml-indent-regexp-end "^[ \t]*\\(endif\\|else\\|end\\|end\s+note\\|.*}\\|deactivate\s+.*\\)") (setq plantuml-font-lock-keywords `( @@ -409,8 +409,7 @@ Uses prefix (as PREFIX) to choose where to display it: (bob-visited? nil)) (beginning-of-line) (forward-line -1) - (while (and (>= relative-depth 0) - (not bob-visited?)) + (while (not bob-visited?) (if (bobp) (setq bob-visited? t)) (if (looking-at plantuml-indent-regexp-end)