branch: externals/ergoemacs-mode
commit fc907047e6338504ce31f064e9e5798a85541e0c
Author: Walter Landry <[email protected]>
Commit: Walter Landry <[email protected]>
Remove some macros by getting rid of some remappings
---
ergoemacs-functions.el | 16 ++++------------
ergoemacs-test.el | 5 ++---
ergoemacs-theme-engine.el | 2 +-
ergoemacs-themes.el | 2 +-
4 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index 39f9545..dc4b478 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -1119,26 +1119,18 @@ Subsequent calls expands the selection to larger
semantic unit."
(defun ergoemacs-kill-line-backward (&optional number)
"Kill text between the beginning of the line to the cursor position.
-If there's no text, delete the previous line ending.
-Use `ergoemacs-remap' in case kill line was remapped."
+If there's no text, delete the previous line ending."
(interactive "p")
(if (and (= number 1) (looking-back "\n" nil))
(delete-char -1)
(setq current-prefix-arg (- 1 number))
- (ergoemacs :remap 'kill-line)))
-
-(defun ergoemacs-move-cursor-next-pane ()
- "Move cursor to the next pane.
-Use `ergoemacs-remap' for maximum mode compatibility."
- (interactive)
- (ergoemacs :remap 'other-window))
+ (kill-line)))
(defun ergoemacs-move-cursor-previous-pane (&optional number)
- "Move cursor to the previous pane.
-Use `ergoemacs-shortcut-interal' for maximum mode compatibility."
+ "Move cursor to the previous pane."
(interactive "p")
(setq current-prefix-arg (if number (- 0 number) -1))
- (ergoemacs :remap 'other-window))
+ (other-window))
(defun ergoemacs-unfill-paragraph ()
"Replace newline char in current paragraph by space.
diff --git a/ergoemacs-test.el b/ergoemacs-test.el
index b0778cf..28296bf 100644
--- a/ergoemacs-test.el
+++ b/ergoemacs-test.el
@@ -725,7 +725,7 @@ Should test issue #142"
"(setq ergoemacs-keyboard-layout \"us\")"
"(ergoemacs-mode 1)\n"
"(global-set-key (kbd \"C-SPC\") 'set-mark-command)\n"
- "(when (eq (key-binding (kbd \"M-s\"))
'ergoemacs-move-cursor-next-pane)\n"
+ "(when (eq (key-binding (kbd \"M-s\")) 'other-window)\n"
"(with-temp-file \"" w-file "\")\n"
" (message \"Passed\")"
" (insert \"Found\"))\n"
@@ -764,7 +764,6 @@ Should test issue #142"
"(ergoemacs-mode 1)\n"
"(global-set-key (kbd \"C-SPC\") 'set-mark-command)\n"
"(when (eq (key-binding (kbd \"C-SPC\")) 'set-mark-command)\n"
- ;; " (eq (key-binding (kbd \"M-s\"))
'ergoemacs-move-cursor-next-pane))\n"
"(with-temp-file \"" w-file "\")\n"
" (message \"Passed\")"
" (insert \"Found\"))\n"
@@ -913,7 +912,7 @@ Tests Issue #372."
(when (not (current-local-map))
(use-local-map ergoemacs-test-major-mode-map))
(ergoemacs-map--modify-active)
- (should (eq (key-binding (kbd "M-r"))
'ergoemacs-move-cursor-next-pane))))))
+ (should (eq (key-binding (kbd "M-r")) 'other-window))))))
(ert-deftest ergoemacs-test-dired-sort-files ()
"Test Issue #340"
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index d4a9d3f..14eebdf 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -642,7 +642,7 @@ See also `find-function-recenter-line' and
`find-function-after-hook'."
(ergoemacs-forward-block "→ ¶")
(ergoemacs-forward-close-bracket "→ bracket")
(ergoemacs-kill-line-backward "⌫ line")
- (ergoemacs-move-cursor-next-pane "next pane")
+ (other-window "next pane")
(ergoemacs-move-cursor-previous-pane "prev pane")
(ergoemacs-new-empty-buffer "New")
(ergoemacs-open-in-external-app "OS Open")
diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el
index 4929159..f7e8894 100644
--- a/ergoemacs-themes.el
+++ b/ergoemacs-themes.el
@@ -520,7 +520,7 @@ calling any other ergoemacs-set-* function"
(defun ergoemacs-set-switch (keymap)
"Window/Frame/Tab Switching"
- (ergoemacs-define-key keymap (kbd "M-s") 'ergoemacs-move-cursor-next-pane)
+ (ergoemacs-define-key keymap (kbd "M-s") 'other-window)
(ergoemacs-define-key keymap (kbd "M-S")
'ergoemacs-move-cursor-previous-pane)
(ergoemacs-define-key keymap (kbd "M-~") 'ergoemacs-switch-to-previous-frame)