diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2023-02-12 23:14:14 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2023-02-12 23:14:14 +0100 |
| commit | 59867aebe16454be4d8c0c858f3b00b8a34f3f61 (patch) | |
| tree | 5b0e74bea9de0536cdc4603a6a37e89a4e8d9e57 /lisp | |
| parent | e5ba1cab376e71e7a858dd4855365a57c4ddb40d (diff) | |
Use defvar-keymap
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/with-editor.el | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lisp/with-editor.el b/lisp/with-editor.el index 9dc95b3..66d603a 100644 --- a/lisp/with-editor.el +++ b/lisp/with-editor.el @@ -400,18 +400,16 @@ And some tools that do not handle $EDITOR properly also break." ;;; Mode -(defvar with-editor-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "\C-c\C-c" #'with-editor-finish) - (define-key map [remap server-edit] #'with-editor-finish) - (define-key map [remap evil-save-and-close] #'with-editor-finish) - (define-key map [remap evil-save-modified-and-close] #'with-editor-finish) - (define-key map "\C-c\C-k" #'with-editor-cancel) - (define-key map [remap kill-buffer] #'with-editor-cancel) - (define-key map [remap ido-kill-buffer] #'with-editor-cancel) - (define-key map [remap iswitchb-kill-buffer] #'with-editor-cancel) - (define-key map [remap evil-quit] #'with-editor-cancel) - map)) +(defvar-keymap with-editor-mode-map + "C-c C-c" #'with-editor-finish + "<remap> <server-edit>" #'with-editor-finish + "<remap> <evil-save-and-close>" #'with-editor-finish + "<remap> <evil-save-modified-and-close>" #'with-editor-finish + "C-c C-k" #'with-editor-cancel + "<remap> <kill-buffer>" #'with-editor-cancel + "<remap> <ido-kill-buffer>" #'with-editor-cancel + "<remap> <iswitchb-kill-buffer>" #'with-editor-cancel + "<remap> <evil-quit>" #'with-editor-cancel) (define-minor-mode with-editor-mode "Edit a file as the $EDITOR of an external process." |
