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

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

[elpa] externals/ergoemacs-mode ac33443 265/325: Add back the M-n comman


From: Stefan Monnier
Subject: [elpa] externals/ergoemacs-mode ac33443 265/325: Add back the M-n commands for the reduction keymap
Date: Sat, 23 Oct 2021 18:49:07 -0400 (EDT)

branch: externals/ergoemacs-mode
commit ac33443e9e7a0923666bb7f4b2581a7bcb4589d8
Author: Matthew Fidler <514778+mattfidler@users.noreply.github.com>
Commit: Matthew Fidler <514778+mattfidler@users.noreply.github.com>

    Add back the M-n commands for the reduction keymap
---
 ergoemacs-functions.el | 38 ++++++++++++--------------------------
 ergoemacs-themes.el    |  7 ++++++-
 2 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index 66e5a94..07bee8b 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -88,6 +88,12 @@
 
 (declare-function undo-tree-mode "undo-tree")
 
+(declare-function flyspell-auto-correct-previous-word "fylspell")
+(declare-function w32-shell-execute "compat")
+(declare-function w32-long-file-name "compat")
+(declare-function term-paste "term")
+(declare-function calc-yank "calc-yank")
+
 (defcustom ergoemacs-isearch-backward-char-to-edit nil
   "Backward char will edit isearch."
   :type 'boolean
@@ -651,22 +657,12 @@ This behavior can be turned off with
   (interactive)
   (let ((ma (region-active-p)))
     (if current-prefix-arg
-        (let ((pt (point)))
-          ;; (setq prefix-arg current-prefix-arg)
-          (end-of-buffer)
-          (when (= pt (point))
-            (call-interactively 'end-of-buffer)))
+        (call-interactively 'end-of-buffer)
       (cond
        ((and ergoemacs-repeatable-beginning-or-end-of-buffer (bobp))
-        (let ((pt (point)))
-          (end-of-buffer)
-          (when (= pt (point))
-            (call-interactively 'end-of-buffer))))
+        (call-interactively 'end-of-buffer))
        (t
-        (let ((pt (point)))
-          (beginning-of-buffer)
-          (when (= pt (point))
-            (call-interactively 'beginning-of-buffer))))))
+        (call-interactively 'beginning-of-buffer))))
     (when (and (not ma) (region-active-p))
       (deactivate-mark))))
 
@@ -688,22 +684,12 @@ This will not honor `shift-select-mode'."
   (interactive)
   (let ((ma (region-active-p)))
     (if current-prefix-arg
-        (let ((pt (point)))
-          ;; (setq prefix-arg current-prefix-arg)
-          (end-of-buffer)
-          (when (= pt (point))
-            (call-interactively 'end-of-buffer)))
+        (call-interactively 'end-of-buffer)
       (cond
        ((and ergoemacs-repeatable-beginning-or-end-of-buffer (eobp))
-        (let ((pt (point)))
-          (beginning-of-buffer)
-          (when (= pt (point))
-            (call-interactively 'beginning-of-buffer))))
+        (call-interactively 'beginning-of-buffer))
        (t
-        (let ((pt (point)))
-          (end-of-buffer)
-          (when (= pt (point))
-            (call-interactively 'end-of-buffer))))))
+        (call-interactively 'end-of-buffer))))
     (when (and (not ma) (region-active-p))
       (deactivate-mark))))
 
diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el
index 5b93774..59b6402 100644
--- a/ergoemacs-themes.el
+++ b/ergoemacs-themes.el
@@ -439,6 +439,11 @@ These keys do not depend on the layout."
   (ergoemacs-define-key keymap (kbd "M-n") 'beginning-of-buffer)
   (ergoemacs-define-key keymap (kbd "M-N") 'end-of-buffer))
 
+(defun ergoemacs-set-move-buffer-reduction (keymap)
+  "Move by buffer in KEYMAP."
+  (ergoemacs-define-key keymap (kbd "M-n") 
'ergoemacs-beginning-or-end-of-buffer)
+  (ergoemacs-define-key keymap (kbd "M-N") 
'ergoemacs-end-or-beginning-of-buffer))
+
 (defun ergoemacs-set-move-bracket (keymap)
   "Move By Bracket for KEYMAP."
   (ergoemacs-define-key keymap (kbd "M-J") 'ergoemacs-backward-open-bracket)
@@ -1275,7 +1280,7 @@ In a terminal, this can be either arrow keys (e.g. meta+O 
A == <up>) or regular
   (ergoemacs-set-standard-fixed ergoemacs-override-keymap)
   (ergoemacs-set-help ergoemacs-override-keymap)
   (ergoemacs-set-move-char ergoemacs-override-keymap)
-  (ergoemacs-set-move-buffer ergoemacs-override-keymap)
+  (ergoemacs-set-move-buffer-reduction ergoemacs-override-keymap)
   (ergoemacs-set-move-bracket ergoemacs-override-keymap)
   (ergoemacs-set-move-word ergoemacs-override-keymap)
   ;;(ergoemacs-set-move-paragraph ergoemacs-override-keymap)



reply via email to

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