branch: elpa/swift-mode commit 0e24233686980c2a40172c4f2cab8c5f28fa1532 Author: taku0 <mxxouy6x3m_git...@tatapa.org> Commit: taku0 <mxxouy6x3m_git...@tatapa.org>
Fix forward/backward-sexp inside comments --- swift-mode-lexer.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/swift-mode-lexer.el b/swift-mode-lexer.el index d5c1ed8..64d91c4 100644 --- a/swift-mode-lexer.el +++ b/swift-mode-lexer.el @@ -511,6 +511,8 @@ Return the token object. If no more tokens available, return a token with type `out-of-buffer'" (let ((pos (point))) + (when (nth 4 (syntax-ppss)) + (goto-char (nth 8 (syntax-ppss)))) (forward-comment (point-max)) (cond ;; Outside of buffer @@ -679,6 +681,8 @@ Return the token object. If no more tokens available, return a token with type `out-of-buffer'." (let ((pos (point))) + (when (nth 4 (syntax-ppss)) + (goto-char (nth 8 (syntax-ppss)))) (forward-comment (- (point))) (cond ;; Outside of buffer