[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 5fe41a2: Fix a glitch in CC Mode's syntactic whites
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] master 5fe41a2: Fix a glitch in CC Mode's syntactic whitespace cache. |
Date: |
Thu, 31 Aug 2017 15:11:20 -0400 (EDT) |
branch: master
commit 5fe41a23d811b17bcde0921b37b89175806c83ef
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>
Fix a glitch in CC Mode's syntactic whitespace cache.
* lisp/progmodes/cc-engine.el (c-forward-sws): Deal correctly with a block
comment close at the end of a macro.
---
lisp/progmodes/cc-engine.el | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index d20e575..bf95dc1 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -1980,17 +1980,10 @@ comment at the start of cc-engine.el for more info."
(end-of-line))
(setq macro-end (point))
;; Check for an open block comment at the end of the macro.
- (goto-char macro-start)
- (let (s in-block-comment)
- (while
- (progn
- (setq s (parse-partial-sexp (point) macro-end
- nil nil s 'syntax-table))
- (< (point) macro-end))
- (setq in-block-comment
- (and (elt s 4) ; in a comment
- (null (elt s 7))))) ; a block comment
- (if in-block-comment (setq safe-start nil)))
+ (let ((s (parse-partial-sexp macro-start macro-end)))
+ (if (and (elt s 4) ; in a comment
+ (null (elt s 7))) ; a block comment
+ (setq safe-start nil)))
(forward-line 1)
;; Don't cache at eob in case the buffer is narrowed.
(not (eobp)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 5fe41a2: Fix a glitch in CC Mode's syntactic whitespace cache.,
Alan Mackenzie <=