1 new commit in cc-mode:
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.
Specify that the position of the extremity of the head or tail is in the match
Affected #: 1 file
diff -r 2f43f4e7728c0f4f751203fc2725feafa20773ba -r
＠＠ -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).
(let ((here (point))
(if (and (memq (char-before) '(?x ?X))
(eq (char-before (1- (point))) ?0))
- (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))))))
+ (setq found
+ (search-forward-regexp c-maybe-quoted-number-head here t))
+ (< found here)))
+ (and (eq found here) (match-beginning 0))))))
＠＠ -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).
(and (looking-at c-maybe-quoted-number-tail)
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