aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/cc-mode.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 1a360048752..ea865e0b0fb 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1529,9 +1529,12 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
1529 (goto-char (match-end 0)) 1529 (goto-char (match-end 0))
1530 (if (> (match-end 0) c-new-BEG) 1530 (if (> (match-end 0) c-new-BEG)
1531 (setq c-new-BEG (1- (match-beginning 0))))) 1531 (setq c-new-BEG (1- (match-beginning 0)))))
1532 ((looking-at "\\\\'")
1533 (setq c-new-BEG (min c-new-BEG (1- (point))))
1534 (goto-char (match-end 0)))
1532 ((save-excursion 1535 ((save-excursion
1533 (not (search-forward "'" c-new-BEG t))) 1536 (not (search-forward "'" c-new-BEG t)))
1534 (setq c-new-BEG (1- (point)))) 1537 (setq c-new-BEG (min c-new-BEG (1- (point)))))
1535 (t nil))) 1538 (t nil)))
1536 1539
1537 (goto-char c-new-END) 1540 (goto-char c-new-END)
@@ -1555,6 +1558,9 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
1555 (goto-char (match-end 0)) 1558 (goto-char (match-end 0))
1556 (if (> (match-end 0) c-new-END) 1559 (if (> (match-end 0) c-new-END)
1557 (setq c-new-END (match-end 0)))) 1560 (setq c-new-END (match-end 0))))
1561 ((looking-at "\\\\'")
1562 (goto-char (match-end 0))
1563 (setq c-new-END (max c-new-END (point))))
1558 ((equal (c-get-char-property (1- (point)) 'syntax-table) '(1)) 1564 ((equal (c-get-char-property (1- (point)) 'syntax-table) '(1))
1559 (when (c-search-forward-char-property-with-value-on-char 1565 (when (c-search-forward-char-property-with-value-on-char
1560 'syntax-table '(1) ?\' (c-point 'eoll)) 1566 'syntax-table '(1) ?\' (c-point 'eoll))
@@ -1624,6 +1630,12 @@ Note that this is a strict tail, so won't match, e.g. \"0x....\".")
1624 "\\([^\\']\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\ 1630 "\\([^\\']\\|\\\\\\([0-7]\\{1,3\\}\\|[xuU][0-9a-fA-F]+\\|.\\)\
1625\\)'") ; balanced quoted expression. 1631\\)'") ; balanced quoted expression.
1626 (goto-char (match-end 0))) 1632 (goto-char (match-end 0)))
1633 ((looking-at "\\\\'") ; Anomalous construct.
1634 (c-invalidate-state-cache (1- (point)))
1635 (c-truncate-semi-nonlit-pos-cache (1- (point)))
1636 (c-put-char-properties-on-char (1- (point)) (+ (point) 2)
1637 'syntax-table '(1) ?')
1638 (goto-char (match-end 0)))
1627 (t 1639 (t
1628 (c-invalidate-state-cache (1- (point))) 1640 (c-invalidate-state-cache (1- (point)))
1629 (c-truncate-semi-nonlit-pos-cache (1- (point))) 1641 (c-truncate-semi-nonlit-pos-cache (1- (point)))