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

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

[elpa] 79/117: Allow repeated visual beginning/end of line


From: Matthew Fidler
Subject: [elpa] 79/117: Allow repeated visual beginning/end of line
Date: Fri, 25 Jul 2014 13:24:24 +0000

mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.

commit 6742fe07381fde1468112f399db6c6e9a12f42d4
Author: Matthew L. Fidler <address@hidden>
Date:   Mon Jul 21 15:40:34 2014 -0500

    Allow repeated visual beginning/end of line
---
 ergoemacs-functions.el |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index 1e4c7b0..075a427 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -730,8 +730,11 @@ the prefix arguments of `beginning-of-buffer',
           ;; (setq prefix-arg nil)
           (setq current-prefix-arg nil)
           (ergoemacs-shortcut-remap 'move-beginning-of-line)
-          ;; (setq this-command 'move-beginning-of-line)
-          (push (point) pts))
+          (push (point) pts)
+          (when (and (not (bolp)) (not (bobp)))
+            (backward-char 1)
+            (ergoemacs-shortcut-remap 'move-beginning-of-line)
+            (push (point) pts)))
         (when ergoemacs-back-to-indentation
           (save-excursion
             (back-to-indentation)
@@ -853,7 +856,13 @@ the prefix arguments of `end-of-buffer',
         (setq current-prefix-arg nil)
         (save-excursion
           (ergoemacs-shortcut-remap 'move-end-of-line)
-          (push (point) pts))
+          (push (point) pts)
+          ;; Support visual lines mode and allow going to the next
+          ;; end of the visual line...
+          (when (and (not (eolp)) (not (eobp)))
+            (forward-char 1)
+            (ergoemacs-shortcut-remap 'move-end-of-line)
+            (push (point) pts)))
         (when ergoemacs-end-of-comment-line
           (save-excursion
             ;; See http://www.emacswiki.org/emacs/EndOfLineNoComments



reply via email to

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