emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/haskell-tng-mode 1475f31 196/385: workaround bad indentati


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-tng-mode 1475f31 196/385: workaround bad indentation at the end of files
Date: Tue, 5 Oct 2021 23:59:30 -0400 (EDT)

branch: elpa/haskell-tng-mode
commit 1475f314145841fca939df55086c9cfea4d930dd
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>

    workaround bad indentation at the end of files
---
 haskell-tng-smie.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/haskell-tng-smie.el b/haskell-tng-smie.el
index dfd5d6a..9a61bed 100644
--- a/haskell-tng-smie.el
+++ b/haskell-tng-smie.el
@@ -35,9 +35,12 @@
   (interactive)
   ;; TODO a dynamically bound variable might improve the quality of
   ;;      'empty-line-token predictions.
+  (when (<= (- (point-max) 1) (point))
+    ;; WORKAROUND https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36432
+    ;; TODO fix the bug properly in SMIE
+    (save-excursion (insert "\n\n")))
   (let ((rem (when (/= (point) (line-end-position))
                (buffer-substring-no-properties (point) (line-end-position)))))
-    ;; TODO https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36432
     (when rem
       (delete-region (point) (line-end-position)))
     ;; TODO don't continue line comments if there is code before them



reply via email to

[Prev in Thread] Current Thread [Next in Thread]