]> git.eshelyaron.com Git - dict.git/commitdiff
FIXED: indentation after with inline comments
authorEshel Yaron <me@eshelyaron.com>
Wed, 14 Sep 2022 18:35:44 +0000 (21:35 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 14 Sep 2022 18:35:44 +0000 (21:35 +0300)
sweep.el

index 7d0bfd0a6d49768a6fcf4bd92074bc7d461f95e1..faaac58fdaf650749b9c22554d98f9a66889db48 100644 (file)
--- 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)