From: Eshel Yaron Date: Fri, 23 Sep 2022 16:10:49 +0000 (+0300) Subject: FIXED: indentation error when typing at end of buffer X-Git-Tag: v0.3.2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ecf601dd549ad33524ad8795d46c43b45dd20ea6;p=sweep.git FIXED: indentation error when typing at end of buffer --- diff --git a/sweep.el b/sweep.el index 9291e97..9aa5868 100644 --- a/sweep.el +++ b/sweep.el @@ -6,7 +6,7 @@ ;; Maintainer: Eshel Yaron ;; Keywords: prolog languages extensions ;; URL: https://git.sr.ht/~eshel/sweep -;; Package-Version: 0.3.1 +;; Package-Version: 0.3.2 ;; Package-Requires: ((emacs "28")) ;; This file is NOT part of GNU Emacs. @@ -1356,7 +1356,8 @@ Interactively, a prefix arg means to prompt for BUFFER." (back-to-indentation) (let ((indent (if (nth 8 (syntax-ppss)) 'noindent - (if-let ((open (and (= (char-syntax (char-after)) ?\)) + (if-let ((open (and (not (eobp)) + (= (char-syntax (char-after)) ?\)) (nth 1 (syntax-ppss))))) (save-excursion (goto-char open)