diff options
Diffstat (limited to 'lisp/progmodes/cc-engine.el')
-rw-r--r-- | lisp/progmodes/cc-engine.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index c3cd31fdd00..23fb1effdd4 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -388,14 +388,17 @@ comment at the start of cc-engine.el for more info." (forward-char) t))) (let ((cand-EOM (point))) - (if (and c-last-open-c-comment-start-on-line-re + (if (and c-open-c-comment-on-logical-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))) + c-open-c-comment-on-logical-line-re + nil t) + (match-beginning 1) + (progn + (goto-char (match-beginning 1)) + (and (c-forward-single-comment) + (> (point) cand-EOM)))) + t + (goto-char cand-EOM) nil))))) (when (and (car c-macro-cache) |