1 new commit in cc-mode:
https://bitbucket.org/xemacs/cc-mode/commits/618a98937a78/
Changeset: 618a98937a78
User: acm
Date: 2017-07-02 12:40:03+00:00
Summary: Fix bug in yesterday's CC Mode commit.
* cc-mode.el (c-quoted-number-head-before-point): Check a search has succeded
before using the match data.
(c-quoted-number-head-before-point, c-quoted-number-head-after-point):
Specify that the position of the extremity of the head or tail is in the match
data.
Affected #: 1 file
diff -r 2f43f4e7728c0f4f751203fc2725feafa20773ba -r
618a98937a7827c32fb478de7d58465361c2fd75 cc-mode.el
--- a/cc-mode.el
+++ b/cc-mode.el
@@ -1093,18 +1093,22 @@
(defun c-quoted-number-head-before-point ()
;; Return non-nil when the head of a possibly quoted number is found
;; immediately before point. The value returned in this case is the buffer
- ;; position of the start of the head.
+ ;; position of the start of the head. That position is also in
+ ;; (match-beginning 0).
(when c-has-quoted-numbers
(save-excursion
(let ((here (point))
- )
+ found)
(skip-chars-backward "0-9a-fA-F'")
(if (and (memq (char-before) '(?x ?X))
(eq (char-before (1- (point))) ?0))
(backward-char 2))
- (while (and (search-forward-regexp c-maybe-quoted-number-head here t)
- (< (match-end 0) here)))
- (and (eq (match-end 0) here) (match-beginning 0))))))
+ (while
+ (and
+ (setq found
+ (search-forward-regexp c-maybe-quoted-number-head here t))
+ (< found here)))
+ (and (eq found here) (match-beginning 0))))))
(defconst c-maybe-quoted-number-tail
(concat
@@ -1121,7 +1125,7 @@
(defun c-quoted-number-tail-after-point ()
;; Return non-nil when a proper tail of a possibly quoted number is found
;; immediately after point. The value returned in this case is the buffer
- ;; position of the end of the tail.
+ ;; position of the end of the tail. That position is also in (match-end 0).
(when c-has-quoted-numbers
(and (looking-at c-maybe-quoted-number-tail)
(match-end 0))))
Repository URL:
https://bitbucket.org/xemacs/cc-mode/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.