summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-langs.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2019-07-04 13:18:51 +0000
committerAlan Mackenzie <acm@muc.de>2019-07-04 13:18:51 +0000
commit4bf4002906fe60fda35c5ea725ffc0463ca4c26b (patch)
tree7d5bd931e58bce4c94c6a8e33e61ece0b9f0ab82 /lisp/progmodes/cc-langs.el
parent5b48dab412c61980bca63a67a5d548d07e56b404 (diff)
downloademacs-4bf4002906fe60fda35c5ea725ffc0463ca4c26b.tar.gz
Fix an infinite loop in c-end-of-macro. Should fix bug #36484
Also fix two faulty regexps, save-match-data, and check c-major-mode-is 'c++-mode where needed. * lis/progmodes/cc-langs.el (c-last-c-comment-end-on-line-re) (c-last-open-c-comment-start-on-line-re): Handle repeated *s in regexp correctly. * lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-end-of-macro): Protect the match-data with save-match-data around regexp operations. (c-end-of-macro): In the loop handling multiline block comments, check a comment actually is multiline. * lisp/progmodes/cc-mode.el (c-depropertize-CPP): Only call c-depropertize-raw-strings-in-region in C++ Mode.
Diffstat (limited to 'lisp/progmodes/cc-langs.el')
-rw-r--r--lisp/progmodes/cc-langs.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 153d3fc2608..a0d4559c207 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -1608,7 +1608,7 @@ backslash."
current line, if any, or nil in those languages without block
comments. When a match is found, submatch 1 contains the comment
ender."
- t "\\(\\*/\\)\\([^*]\\|\\*[^/]\\)*$"
+ t "\\(\\*/\\)\\([^*]\\|\\*+[^/]\\)*$"
awk nil)
(c-lang-defvar c-last-c-comment-end-on-line-re
(c-lang-const c-last-c-comment-end-on-line-re))
@@ -1618,7 +1618,7 @@ ender."
current ine, if any, or nil in those languages without block
comments. When a match is found, submatch 1 contains the comment
starter."
- t "\\(/\\*\\)\\([^*]\\|\\*[^/]\\)*$"
+ t "\\(/\\*\\)\\([^*]\\|\\*+[^/]\\)*$"
awk nil)
(c-lang-defvar c-last-open-c-comment-start-on-line-re
(c-lang-const c-last-open-c-comment-start-on-line-re))