diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-04-14 22:59:28 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-04-14 22:59:28 +0200 |
| commit | d1a622cf8e03e829ac30086178cab61b64282521 (patch) | |
| tree | a1318d891da06605f94eb9a1c86503664d45e388 | |
| parent | 4e27c304ba51e64af8fd0e1295caf86e71e338d4 (diff) | |
| download | dotfiles-d1a622cf8e03e829ac30086178cab61b64282521.tar.xz | |
Enable repeat-mode for Emacs≥28
| -rw-r--r-- | .emacs | 16 | ||||
| -rw-r--r-- | .emacs-custom.el | 1 |
2 files changed, 9 insertions, 8 deletions
@@ -36,14 +36,14 @@ (global-set-key (kbd "C-x C-b") 'ibuffer) -(defun my/other-window (count &optional all-frames) - (interactive "p") - (let ((repeat-map (make-sparse-keymap))) - (define-key repeat-map [?o] #'other-window) - (set-transient-map repeat-map t) - (other-window count all-frames))) - -(global-set-key (kbd "C-x o") #'my/other-window) +(when (< emacs-major-version 28) + (defun my/other-window (count &optional all-frames) + (interactive "p") + (let ((repeat-map (make-sparse-keymap))) + (define-key repeat-map [?o] #'other-window) + (set-transient-map repeat-map t) + (other-window count all-frames))) + (global-set-key (kbd "C-x o") #'my/other-window)) ;; Hopefully these will be easier to remember than TeX commands: diff --git a/.emacs-custom.el b/.emacs-custom.el index ef10a73..742822a 100644 --- a/.emacs-custom.el +++ b/.emacs-custom.el @@ -96,6 +96,7 @@ '(read-char-by-name-group t) '(read-char-by-name-sort 'code) '(read-file-name-completion-ignore-case t) + '(repeat-mode t) '(scroll-bar-mode nil) '(scroll-conservatively 10) '(scroll-preserve-screen-position t) |
