aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2019-01-24 13:45:49 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2019-01-24 13:45:49 +0100
commit00eee3b335f7c34e98fb9d7ee483842bb17dd0ab (patch)
treed8c676119efcc367cc9ddc01443dfa099f884e70
parent476f31aa5e98808c1824f86bacf5735c197e34aa (diff)
downloaddotfiles-00eee3b335f7c34e98fb9d7ee483842bb17dd0ab.tar.gz
dotfiles-00eee3b335f7c34e98fb9d7ee483842bb17dd0ab.zip
emacs: let's remove a lot of clutter on keyboard-quit
Up until now I had the [escape] character mixed between lots of weird operations on the keyboard-quit function for the minibuffer. Let's try using more the good ol' C-g key chord for this instead. Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
-rw-r--r--emacs/init.org21
1 files changed, 0 insertions, 21 deletions
diff --git a/emacs/init.org b/emacs/init.org
index 452dbe8..dc4057b 100644
--- a/emacs/init.org
+++ b/emacs/init.org
@@ -825,27 +825,6 @@ First of all, let's define a function that will be called whenever Evil is loade
(define-key (eval map) "\C-a" 'beginning-of-line)
(define-key (eval map) "\C-e" 'end-of-line)))
- ; both this function and the subsequent lines about [escape] are taken from
- ; @aaronbieber configuration.
- (defun minibuffer-keyboard-quit ()
- "Abort recursive edit.
-In Delete Selection mode, if the mark is active, just deactivate it;
-then it takes a second \\[keyboard-quit] to abort the minibuffer."
- (interactive)
- (if (and delete-selection-mode transient-mark-mode mark-active)
- (setq deactivate-mark t)
- (when (get-buffer "*Completions*") (delete-windows-on "*Completions*"))
- (abort-recursive-edit)))
-
- ;; Make escape quit everything, whenever possible.
- (define-key evil-normal-state-map [escape] 'keyboard-quit)
- (define-key evil-visual-state-map [escape] 'keyboard-quit)
- (define-key minibuffer-local-map [escape] 'minibuffer-keyboard-quit)
- (define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit)
- (define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit)
- (define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit)
- (define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit)
-
; I store macros on the <q> register for convenience, so I used to use the
; <C-q> combo to execute this macro in Vim. In Emacs though, this combo is
; reserved to a rather useful function, and I'd like to keep it that way. So,