From 0f1119fb75adae53e552bb0c20d3067ecb909d40 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 14 Sep 2022 21:35:44 +0300 Subject: [PATCH] FIXED: indentation after with inline comments --- sweep.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sweep.el b/sweep.el index 7d0bfd0..faaac58 100644 --- a/sweep.el +++ b/sweep.el @@ -1219,12 +1219,14 @@ Interactively, a prefix arg means to prompt for BUFFER." (defun sweep-indent-line-ends-with-comment-or-string-p () (save-excursion (end-of-line) - (nth 8 (syntax-ppss)))) + (when-let ((beg (nth 8 (syntax-ppss)))) + (<= beg (line-beginning-position))))) (defun sweep-indent-line-ends-with-fullstop-p () (save-excursion (end-of-line) - (= ?. (preceding-char)))) + (unless (nth 8 (syntax-ppss)) + (= ?. (preceding-char))))) (defun sweep-syntax-propertize (start end) (goto-char start) -- 2.39.5