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

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

[nongnu] elpa/go-mode 3300479 225/495: fix beginning-of-defun when point


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 3300479 225/495: fix beginning-of-defun when point is near the start of a function
Date: Sat, 7 Aug 2021 09:05:19 -0400 (EDT)

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

    fix beginning-of-defun when point is near the start of a function
---
 go-mode.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/go-mode.el b/go-mode.el
index 9b81ba8..3db868a 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -523,6 +523,8 @@ current line will be returned."
           (goto-char (- (point-max) pos))))))
 
 (defun go-beginning-of-defun (&optional count)
+  (unless (bolp)
+    (end-of-line))
   (setq count (or count 1))
   (let (first failure)
     (dotimes (i (abs count))



reply via email to

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