aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2014-08-02 16:42:29 +0000
committerAlan Mackenzie2014-08-02 16:42:29 +0000
commit790221774532185b590fecd64585309aed034063 (patch)
treec5c9324b874b892345471efecb589882228cf4a5
parentcb8b23675e088b0c3ba6dce8d6a0b085324f04f3 (diff)
downloademacs-790221774532185b590fecd64585309aed034063.tar.gz
emacs-790221774532185b590fecd64585309aed034063.zip
Correct loop termination condition in c-syntactic-skip-backward.
progmodes/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.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/progmodes/cc-engine.el14
2 files changed, 16 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 531cbe5aeed..83975cb885b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12014-08-02 Alan Mackenzie <acm@muc.de>
2
3 Correct loop termination condition in c-syntactic-skip-backward.
4 * progmodes/cc-engine.el (c-syntactic-skip-backward): Correct for
5 the situation where, after moving back out of a literal,
6 skip-chars-backward doesn't move further, yet checks have still to
7 be done.
8
12014-08-01 Eli Zaretskii <eliz@gnu.org> 92014-08-01 Eli Zaretskii <eliz@gnu.org>
2 10
3 * tutorial.el (tutorial--display-changes): Accept punctuation 11 * tutorial.el (tutorial--display-changes): Accept punctuation
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 7404241af9b..0a96b155498 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -4245,16 +4245,18 @@ comment at the start of cc-engine.el for more info."
4245 ;; loops when it hasn't succeeded. 4245 ;; loops when it hasn't succeeded.
4246 (while 4246 (while
4247 (and 4247 (and
4248 (< (skip-chars-backward skip-chars limit) 0) 4248 (let ((pos (point)))
4249 (while (and
4250 (< (skip-chars-backward skip-chars limit) 0)
4251 ;; Don't stop inside a literal.
4252 (when (setq lit-beg (c-ssb-lit-begin))
4253 (goto-char lit-beg)
4254 t)))
4255 (< (point) pos))
4249 4256
4250 (let ((pos (point)) state-2 pps-end-pos) 4257 (let ((pos (point)) state-2 pps-end-pos)
4251 4258
4252 (cond 4259 (cond
4253 ;; Don't stop inside a literal
4254 ((setq lit-beg (c-ssb-lit-begin))
4255 (goto-char lit-beg)
4256 t)
4257
4258 ((and paren-level 4260 ((and paren-level
4259 (save-excursion 4261 (save-excursion
4260 (setq state-2 (parse-partial-sexp 4262 (setq state-2 (parse-partial-sexp