commit/cc-mode: acm: Correct loop termination condition in c-syntactic-skip-backward.

[email protected] Sat, 02 Aug 2014 14:36:38 -0000
Newsgroups gmane.emacs.xemacs.patches
Message-ID <[email protected]>
1 new commit in cc-mode:

https://bitbucket.org/xemacs/cc-mode/commits/35a81ed7bf54/
Changeset:   35a81ed7bf54
User:        acm
Date:        2014-08-02 16:12:11
Summary:     Correct loop termination condition in c-syntactic-skip-backward.
cc-engine.el (c-syntactic-skip-backward): Correct for the situation
  where, after moving back out of a literal, skip-chars-backward doesn't
  move further, yet checks have still to be done.
Affected #:  1 file

diff -r 603cfb35e5525afe5466c6f6860b3068b0493bbf -r 35a81ed7bf543fd761b6b224025c60f12a10260b cc-engine.el
--- a/cc-engine.el
+++ b/cc-engine.el
@@ -4271,16 +4271,18 @@
 	  ;; loops when it hasn't succeeded.
 	  (while
 	      (and
-	       (< (skip-chars-backward skip-chars limit) 0)
+	       (let ((pos (point)))
+		 (while (and
+			 (< (skip-chars-backward skip-chars limit) 0)
+			 ;; Don't stop inside a literal.
+			 (when (setq lit-beg (c-ssb-lit-begin))
+			   (goto-char lit-beg)
+			   t)))
+		 (< (point) pos))
 
 	       (let ((pos (point)) state-2 pps-end-pos)
 
 		 (cond
-		  ;; Don't stop inside a literal
-		  ((setq lit-beg (c-ssb-lit-begin))
-		   (goto-char lit-beg)
-		   t)
-
 		  ((and paren-level
 			(save-excursion
 			  (setq state-2 (parse-partial-sexp

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.