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

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

[nongnu] elpa/go-mode e78baea 054/495: do not leave point at beginning o


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode e78baea 054/495: do not leave point at beginning of line when (not) indenting a comment
Date: Sat, 7 Aug 2021 09:04:42 -0400 (EDT)

branch: elpa/go-mode
commit e78baeab17aeeb8644f852b750f12dbb6e0f6330
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    do not leave point at beginning of line when (not) indenting a comment
    
    Closes gh-16
---
 go-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/go-mode.el b/go-mode.el
index 466a908..4a6cdb5 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -194,10 +194,11 @@ built-ins, functions, and some types.")
         shift-amt
         end
         (pos (- (point-max) (point)))
+        (point (point))
         (beg (progn (beginning-of-line) (point))))
     (back-to-indentation)
     (if (go-in-comment-p) ;; Do not change the indentation of multi-line 
comments
-        nil
+        (goto-char point)
       (if (looking-at "case .+:\\|default:")
           (setq indent (- indent tab-width)))
       (if (and (looking-at "[[:word:]]+:\\([[:space:]]*/.+\\)?$")



reply via email to

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