[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode aafc9d9 119/325: Implement many standard
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ergoemacs-mode aafc9d9 119/325: Implement many standard-fixed bindings in a regular function |
Date: |
Sat, 23 Oct 2021 18:48:34 -0400 (EDT) |
branch: externals/ergoemacs-mode
commit aafc9d9ad8d008ec046f1c4f5114a229ce085b06
Author: Walter Landry <wlandry@caltech.edu>
Commit: Walter Landry <wlandry@caltech.edu>
Implement many standard-fixed bindings in a regular function
Also remove bindings for <next> and <prior> since they are not readily
available.
Remove a stray binding for <f5>.
---
ergoemacs-test.el | 37 +------------------------------------
ergoemacs-themes.el | 44 ++++++++++++++------------------------------
2 files changed, 15 insertions(+), 66 deletions(-)
diff --git a/ergoemacs-test.el b/ergoemacs-test.el
index fc56462..462d1cb 100644
--- a/ergoemacs-test.el
+++ b/ergoemacs-test.el
@@ -259,23 +259,6 @@ sunt in culpa qui officia deserunt mollit anim id est
laborum.")
(should (string= "3" (match-string 0))))
(kill-buffer (current-buffer)))))
-(ert-deftest ergoemacs-test-isearch-exit-C-s ()
- "Make sure C-s works outside of `ergoemacs-mode'. Issue #361."
- :tags '(:search)
- (ergoemacs-mode -1)
- (should (eq (lookup-key isearch-mode-map (kbd "C-s"))
'isearch-repeat-forward))
- (should (eq (lookup-key isearch-mode-map (kbd "C-r"))
'isearch-repeat-backward))
- (save-excursion
- (switch-to-buffer (get-buffer-create "*ergoemacs-test*"))
- (delete-region (point-min) (point-max))
- (insert "aars1\nars2\nars3\nars4")
- (goto-char (point-min))
- (execute-kbd-macro (read-kbd-macro "C-s ars C-s C-s"))
- (when (looking-at ".*")
- (should (string= "3" (match-string 0))))
- (kill-buffer (current-buffer)))
- (ergoemacs-mode 1))
-
(ert-deftest ergoemacs-test-isearch-in-eshell ()
"Test Issue #322."
:tags '(:search)
@@ -462,7 +445,7 @@ not using cua or cutting line. I think kill-region is what
is meant."
(ert-deftest ergoemacs-test-function-unbind-commands-active ()
"Make sure the unbound keys work"
- (should (eq 'ergoemacs-map-undefined (key-binding (read-kbd-macro "C-x
C-s")))))
+ (should (eq nil (key-binding (read-kbd-macro "C-x C-s")))))
(ert-deftest ergoemacs-test-function-M-f-only-one-char-issue-306 ()
"Tests Issue #306."
@@ -1119,24 +1102,6 @@ Part of addressing Issue #147."
;; The user-defined C-w should not affect kill-region remaps.
(should (not (eq (key-binding [ergoemacs-remap kill-region])
'ergoemacs-close-current-buffer))))))
-(ert-deftest ergoemacs-test-keep-ctl-s ()
- "Keep ergoemacs defined C-s in major-mode `ergoemacs-test-major-mode'.
-Part of addressing Issue #147."
- :tags '(:interactive)
- (ergoemacs-test-layout
- (let (ret
- (ergoemacs-use-function-remapping t))
- (with-temp-buffer
- (ergoemacs-test-major-mode)
- (when (not (current-local-map))
- (use-local-map ergoemacs-test-major-mode-map))
- (ergoemacs-map--modify-active)
- (should (eq (key-binding (kbd "C-s")) 'save-buffer))
- )
- )
- )
- )
-
(ert-deftest ergoemacs-test-keep-alt-s ()
"Keep ergoemacs defined M-s in major-mode `ergoemacs-test-major-mode'.
Tests Issue #372."
diff --git a/ergoemacs-themes.el b/ergoemacs-themes.el
index 00f54df..d2c2cff 100644
--- a/ergoemacs-themes.el
+++ b/ergoemacs-themes.el
@@ -151,9 +151,7 @@
)
;;; Fixed components
-(ergoemacs-component standard-fixed ()
- "Standard Fixed Shortcuts"
- :variable-reg nil ;; No variable keys
+(defun ergoemacs-set-standard-fixed ()
(global-set-key [tool-bar kill-buffer] 'ergoemacs-close-current-buffer)
(global-set-key (kbd "C-x C-f") nil) ;; Remove Emacs Method
@@ -163,8 +161,8 @@
(global-set-key (kbd "C-S-t") 'ergoemacs-open-last-closed)
(global-set-key (kbd "C-w") 'ergoemacs-close-current-buffer)
- (global-set-key (kbd "C-s") nil) ;; Search Forward
(global-set-key (kbd "C-f") 'isearch-forward)
+ (define-key isearch-mode-map (kbd "C-f") 'isearch-repeat-forward)
(global-set-key (kbd "C-x C-s") nil) ;; Save File
(global-set-key (kbd "C-s") 'save-buffer)
@@ -179,12 +177,6 @@
(global-set-key (kbd "C-z") 'undo)
- ;; Take out undo-tree's redo bindings
- (define-key undo-tree-map (kbd "C-?") nil)
- (define-key undo-tree-map (kbd "M-_") nil)
-
- (global-set-key (kbd "C-S-z") '(redo undo-tree-redo))
- (global-set-key (kbd "M-S-z") '(redo undo-tree-redo))
(global-set-key (kbd "<S-delete>") 'ergoemacs-cut-line-or-region)
(global-set-key (kbd "<C-insert>") 'ergoemacs-copy-line-or-region)
(global-set-key (kbd "C-S-v") 'ergoemacs-paste-cycle)
@@ -215,25 +207,9 @@
(global-set-key (kbd "<M-up>") 'ergoemacs-backward-block)
(global-set-key (kbd "<M-down>") 'ergoemacs-forward-block)
- ;; C-H is search and replace.
-
- ;; C-1 to C-9 should be switch tab... Same as in Google chrome.
- ;; C-T should be new tab.
-
- ;; Refresh should be <f5>; erogemacs uses <f5>.
;; C-r also should be refresh
- (global-set-key (kbd "<f5>") 'revert-buffer)
(global-set-key (kbd "C-r") 'revert-buffer)
-
- ;; Text Formatting
- ;; Upper/Lower case toggle.
- ;; Ergoemacs fixed keys...
-
- (global-set-key (kbd "<M-f4>") 'ergoemacs-delete-frame) ;; Alt+f4 should
work.
-
- ; Alt+→
- ;; Allow shift selection
(global-set-key (kbd "C-+") 'text-scale-increase)
(global-set-key (kbd "C-=") 'text-scale-increase)
(global-set-key (kbd "C--") 'text-scale-decrease)
@@ -262,11 +238,18 @@
(global-set-key (kbd "C-x k") nil)
(global-set-key (kbd "C-w") 'ergoemacs-close-current-buffer)
- (global-set-key (kbd "C-x C-b") 'ibuffer)
- (global-set-key (kbd "C-y") '(redo undo-tree-redo) "↷ redo")
+ (global-set-key (kbd "M-B") 'ibuffer)
+ )
+
+(ergoemacs-component standard-fixed ()
+ "Standard Fixed Shortcuts"
+ :variable-reg nil ;; No variable keys
+ ;; Take out undo-tree's redo bindings
+ (define-key undo-tree-map (kbd "C-?") nil)
+ (define-key undo-tree-map (kbd "M-_") nil)
- (global-set-key (kbd "M-S-<next>") 'forward-page)
- (global-set-key (kbd "M-S-<prior>") 'backward-page)
+ (global-set-key (kbd "C-S-z") '(redo undo-tree-redo))
+ (global-set-key (kbd "M-S-z") '(redo undo-tree-redo))
;; Mode specific changes
@@ -1301,6 +1284,7 @@
(defun ergoemacs-install-standard-theme ()
(ergoemacs-set-standard-vars)
+ (ergoemacs-set-standard-fixed)
)
(add-hook 'ergoemacs-mode-startup-hook #'ergoemacs-install-standard-theme)
- [elpa] externals/ergoemacs-mode a65ea4d 211/325: Cleanup unused declarations, (continued)
- [elpa] externals/ergoemacs-mode a65ea4d 211/325: Cleanup unused declarations, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode e9259a5 210/325: Remove unused ergoemacs-component-describe, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 6bdd55b 213/325: Remove powerline stuff, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 75b9f50 221/325: More removals, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode acf3dfe 072/325: Cleanup, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 5257c0e 091/325: Remove commented code, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode e5172b8 076/325: Remove more shift translation stuff, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode e84def4 079/325: Remove unused ibuf-ext, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 45c855a 078/325: Remove ergoemacs-score, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode bd169a6 109/325: Make ergoemacs-install-standard-theme(), Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode aafc9d9 119/325: Implement many standard-fixed bindings in a regular function,
Stefan Monnier <=
- [elpa] externals/ergoemacs-mode 3b10ca7 101/325: Remove ergoemacs-theme-set-version, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 7df49a1 123/325: Remove redundant tab-indents-region, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode f4e9a52 104/325: Remove more ergoemacs-theme, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 6559fb9 103/325: Remove unused declaration, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 1fb7b06 132/325: Set most org-mode bindings in a proper function. Turn off some term mapping, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode fdb9e62 139/325: Remove some C- bindings. Make M-B variable. Fix conflicts in some local modes, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode f76cc5e 147/325: Turn off pre-post command hooks and make term bindings work., Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 8c0e8f7 143/325: Fix beginning of line binding in eshell, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 3121362 144/325: Fix magit, message (and thus mu4e), and isearch, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode f636ec3 155/325: Cleanup, Stefan Monnier, 2021/10/23