(beginning-of-line)
(when (or (null lim)
(>= here lim))
- (while
- (progn
- (while (eq (char-before (1- (point))) ?\\)
- (forward-line -1))
- (when (and c-last-c-comment-end-on-line-re
- (re-search-forward
- c-last-c-comment-end-on-line-re pause t))
- (goto-char (match-end 1))
- (if (c-backward-single-comment)
- (progn
- (beginning-of-line)
- (setq pause (point)))
- (goto-char pause)
- nil)))))
+ (save-match-data
+ (while
+ (progn
+ (while (eq (char-before (1- (point))) ?\\)
+ (forward-line -1))
+ (when (and c-last-c-comment-end-on-line-re
+ (re-search-forward
+ c-last-c-comment-end-on-line-re pause t))
+ (goto-char (match-end 1))
+ (if (c-backward-single-comment)
+ (progn
+ (beginning-of-line)
+ (setq pause (point)))
+ (goto-char pause)
+ nil))))))
(back-to-indentation)
(if (and (<= (point) here)
c-macro-cache-start-pos nil
c-macro-cache-syntactic nil
c-macro-cache-no-comment nil))
- (while
- (progn
- (while (progn
- (end-of-line)
- (when (and (eq (char-before) ?\\)
- (not (eobp)))
- (forward-char)
- t)))
- (if (and c-last-open-c-comment-start-on-line-re
- (re-search-backward
- c-last-open-c-comment-start-on-line-re
- (c-point 'bol) t))
- (progn
- (goto-char (match-beginning 1))
- (c-forward-single-comment))
- nil)))
+ (save-match-data
+ (while
+ (progn
+ (while (progn
+ (end-of-line)
+ (when (and (eq (char-before) ?\\)
+ (not (eobp)))
+ (forward-char)
+ t)))
+ (let ((cand-EOM (point)))
+ (if (and c-last-open-c-comment-start-on-line-re
+ (re-search-backward
+ c-last-open-c-comment-start-on-line-re
+ (c-point 'bol) t))
+ (progn
+ (goto-char (match-beginning 1))
+ (and (c-forward-single-comment)
+ (> (point) cand-EOM)))
+ nil)))))
(when (and (car c-macro-cache)
(> (point) (car c-macro-cache)) ; in case we have a
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))
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))
(goto-char (match-beginning 1))
(setq m-beg (point))
(c-end-of-macro)
- (save-excursion (c-depropertize-raw-strings-in-region m-beg (point)))
+ (when (c-major-mode-is 'c++-mode)
+ (save-excursion (c-depropertize-raw-strings-in-region m-beg (point))))
(c-clear-char-property-with-value m-beg (point) 'syntax-table '(1)))
(while (and (< (point) end)
(setq m-beg (point))
(c-end-of-macro))
(when (and ss-found (> (point) end))
- (save-excursion (c-depropertize-raw-strings-in-region m-beg (point)))
+ (when (c-major-mode-is 'c++-mode)
+ (save-excursion (c-depropertize-raw-strings-in-region m-beg (point))))
(c-clear-char-property-with-value m-beg (point) 'syntax-table '(1)))
(while (and (< (point) c-new-END)
(goto-char (match-beginning 1))
(setq m-beg (point))
(c-end-of-macro)
- (save-excursion (c-depropertize-raw-strings-in-region m-beg (point)))
+ (when (c-major-mode-is 'c++-mode)
+ (save-excursion (c-depropertize-raw-strings-in-region m-beg (point))))
(c-clear-char-property-with-value
m-beg (point) 'syntax-table '(1)))))