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

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

[elpa] externals/dts-mode 9ee0854 2/4: Merge pull request #5 from jpkott


From: Stefan Monnier
Subject: [elpa] externals/dts-mode 9ee0854 2/4: Merge pull request #5 from jpkotta/patch-1
Date: Sat, 27 Mar 2021 13:58:26 -0400 (EDT)

branch: externals/dts-mode
commit 9ee0854446dcc6c53d2b8d2941051768dba50344
Merge: 6ec1443 acc7e07
Author: Ben Gamari <ben@smart-cactus.org>
Commit: GitHub <noreply@github.com>

    Merge pull request #5 from jpkotta/patch-1
    
    don't move the point when indenting
---
 dts-mode.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dts-mode.el b/dts-mode.el
index 2ee2f44..86023a7 100644
--- a/dts-mode.el
+++ b/dts-mode.el
@@ -89,7 +89,10 @@
 (defun dts-indent-line ()
   (interactive)
   (let ((indent (dts--calculate-indentation)))
-    (indent-line-to (* indent tab-width))))
+    (save-excursion
+      (indent-line-to (* indent tab-width)))
+    (when (or (bolp) (looking-back "^[[:space:]]+"))
+      (beginning-of-line-text))))
 
 (defalias 'dts-parent-mode
   (if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))



reply via email to

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