Use the kbd macro for all keybindings

This makes more complex keybindings easier to read and write.
This commit is contained in:
Bozhidar Batsov 2022-07-15 20:05:05 +03:00 committed by Rudi Grinberg
parent b24f94243f
commit dee6a8752a
1 changed files with 13 additions and 13 deletions

View File

@ -140,20 +140,20 @@ This hook is only run if exiting actually kills the buffer."
(defvar utop-mode-map (defvar utop-mode-map
(let ((map (make-sparse-keymap))) (let ((map (make-sparse-keymap)))
(define-key map [return] 'utop-eval-input-or-newline) (define-key map (kbd "RET") 'utop-eval-input-or-newline)
(define-key map [(control ?m)] 'utop-eval-input-or-newline) (define-key map (kbd "C-m") 'utop-eval-input-or-newline)
(define-key map [(control ?j)] 'utop-eval-input-auto-end) (define-key map (kbd "C-j") 'utop-eval-input-auto-end)
(define-key map [home] 'utop-bol) (define-key map (kbd "<home>") 'utop-bol)
(define-key map [(control ?a)] 'utop-bol) (define-key map (kbd "C-a") 'utop-bol)
(define-key map [(meta ?p)] 'utop-history-goto-prev) (define-key map (kbd "M-p") 'utop-history-goto-prev)
(define-key map [(meta ?n)] 'utop-history-goto-next) (define-key map (kbd "M-n") 'utop-history-goto-next)
(define-key map (kbd "TAB") 'utop-complete) (define-key map (kbd "TAB") 'utop-complete)
(define-key map [(control ?c) (control ?c)] 'utop-interrupt) (define-key map (kbd "C-c C-c") 'utop-interrupt)
(define-key map [(control ?c) (control ?i)] 'utop-interrupt) (define-key map (kbd "C-c C-i") 'utop-interrupt)
(define-key map [(control ?c) (control ?k)] 'utop-kill) (define-key map (kbd "C-c C-k") 'utop-kill)
(define-key map [(control ?c) (control ?g)] 'utop-exit) (define-key map (kbd "C-c C-g") 'utop-exit)
(define-key map [(control ?c) (control ?s)] 'utop) (define-key map (kbd "C-c C-s") 'utop)
(define-key map [(control ?c) ?m] 'utop-copy-old-input) (define-key map (kbd "C-c m") 'utop-copy-old-input)
map) map)
"The utop local keymap.") "The utop local keymap.")