[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode 87fe6ff 292/325: Remove shift C-c and C-
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ergoemacs-mode 87fe6ff 292/325: Remove shift C-c and C-x for now |
Date: |
Sat, 23 Oct 2021 18:49:13 -0400 (EDT) |
branch: externals/ergoemacs-mode
commit 87fe6ff65a796b428a23efdc5e7ed3eb1e6d0f83
Author: Matthew Fidler <514778+mattfidler@users.noreply.github.com>
Commit: Matthew Fidler <514778+mattfidler@users.noreply.github.com>
Remove shift C-c and C-x for now
---
ergoemacs-command-loop.el | 37 ++++---------------------------------
ergoemacs-mode.el | 2 --
2 files changed, 4 insertions(+), 35 deletions(-)
diff --git a/ergoemacs-command-loop.el b/ergoemacs-command-loop.el
index 95da1af..ce77486 100644
--- a/ergoemacs-command-loop.el
+++ b/ergoemacs-command-loop.el
@@ -862,7 +862,7 @@ KEYS is the keys information"
(defun ergoemacs-command--dispach-cua ()
"Dispatches the CUA C-x and C-c."
- (when (and (not this-command-keys-shift-translated) ergoemacs-mode-cua-mode)
+ (when (and ergoemacs-mode-cua-mode)
(let ((keys (this-single-command-keys)))
(when (and (= 1 (length keys))
(memq (aref keys 0) ergoemacs-command--cua-key-codes)
@@ -881,13 +881,10 @@ KEYS is the keys information"
(defun ergoemacs-command--cua-timer-on ()
"Turn on the cua timer."
- (if (and mark-active ergoemacs-mode-cua-mode
- (not (eq erogemacs-command--cua-timer 'shift)))
- (setq erogemacs-command--cua-timer
- (run-at-time t ergoemacs-command-loop-blink-rate
#'ergoemacs-command--dispach-cua))
- (unless mark-active
+ (if (and mark-active ergoemacs-mode-cua-mode)
(ergoemacs-command--cua-timer-off)
- (setq erogemacs-command--cua-timer nil))))
+ (setq erogemacs-command--cua-timer
+ (run-at-time t ergoemacs-command-loop-blink-rate
#'ergoemacs-command--dispach-cua))))
(defun ergoemacs-command--cua-timer-off ()
"Turn off the cua timer."
@@ -895,32 +892,6 @@ KEYS is the keys information"
(cancel-timer erogemacs-command--cua-timer)))
-;;;;;;;;;;;;
-;; Taken and modified from cua-base
-(defun ergoemacs-cua--shift-control-prefix (prefix)
- ;; handle S-C-x and S-C-c by emulating the fast double prefix function.
- ;; Don't record this command
- (setq this-command last-command)
- ;; Restore the prefix arg
- ;; This should make it so that exchange-point-and-mark gets the prefix when
- ;; you do C-u S-C-x C-x work (where the C-u is properly passed to the C-x
- ;; C-x binding after the first S-C-x was rewritten to just C-x).
- (prefix-command-preserve-state)
- ;; Activate the cua--prefix-repeat-keymap
- (setq erogemacs-command--cua-timer 'shift)
- (ergoemacs-command--cua-timer-off)
- ;; Repalce key
- (setq unread-command-events (list prefix)))
-
-(defun ergoemacs-cua--shift-control-c-prefix ()
- (interactive)
- (ergoemacs-cua--shift-control-prefix ?\C-c))
-
-(defun ergoemacs-cua--shift-control-x-prefix ()
- (interactive)
- (ergoemacs-cua--shift-control-prefix ?\C-x))
-;;;;
-
(add-hook 'ergoemacs-post-command-hook #'ergoemacs-command--cua-timer-on)
(add-hook 'ergoemacs-shutdown-hook #'ergoemacs-command--cua-timer-off)
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 07b4502..e2aa2ee 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -413,8 +413,6 @@ after initializing ergoemacs-mode.
(defvar ergoemacs-mark-active-cua-keymap (let ((map (make-sparse-keymap)))
(define-key map (kbd "C-c
<ergoemacs-timeout>") 'ergoemacs-copy-line-or-region)
(define-key map (kbd "C-x
<ergoemacs-timeout>") 'ergoemacs-cut-line-or-region)
- (define-key map [(shift control c)]
'ergoemacs-cua--shift-control-c-prefix)
- (define-key map [(shift control x)]
'ergoemacs-cua--shift-control-x-prefix)
map)
"The keybinding that is active when the mark is active.")
- [elpa] externals/ergoemacs-mode b815b1d 273/325: Merge branch 'master' of https://github.com/mattfidler/ergoemacs-mode into mattfidler-master, (continued)
- [elpa] externals/ergoemacs-mode b815b1d 273/325: Merge branch 'master' of https://github.com/mattfidler/ergoemacs-mode into mattfidler-master, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode f46ac1c 276/325: Fix typo, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode e81daf4 283/325: Require comit-mode See #505, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode d7b86f6 279/325: Add urgoemacs-redo that requires undo-fu or emacs 28, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 2fcad48 282/325: Allow toggling of ergoemacs-mode-term-raw-mode, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 59c8ab0 285/325: Remove ergoemacs substitute command keys, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 1ef93b5 277/325: Add major modes menu again, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 821a910 287/325: Fix undo-fu, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode d2d29aa 289/325: Another fix for mark-active indent region, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 97623ad 286/325: Remove cua-mode again, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 87fe6ff 292/325: Remove shift C-c and C-x for now,
Stefan Monnier <=
- [elpa] externals/ergoemacs-mode 2ae2ebf 294/325: Remove command loop, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 5689999 299/325: Fix CUA interference, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 9b72665 304/325: Use passthrough for kill-line, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 577997b 310/325: Pull in many more remaps for using Emacs keys, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 0d2d1c6 308/325: Change how sending emacs keys works, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode dc2e1a6 321/325: Bind ergoemacs-M-O for more generic fix, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode ea5a7f5 322/325: Remove compilation mode map (emulation overrides); Fix isearch M-O, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 5692fc1 325/325: Add replacement for `C-h k`, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode e718715 309/325: Add `mark-whole-buffer`, Stefan Monnier, 2021/10/23
- [elpa] externals/ergoemacs-mode 465d265 312/325: Merge branch 'passthrough', Stefan Monnier, 2021/10/23