Equivalent to the builtin repeat-mode #529
-
How do I achieve the same functionality as the builtin (defvar olivetti-width-repeat-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "{") #'olivetti-shrink)
(define-key map (kbd "}") #'olivetti-expand)
(define-key map (kbd "\\") #'olivetti-set-width))
map)
(dolist (cmd '(olivetti-shrink olivetti-expand olivetti-set-width))
(put cmd 'repeat-map 'olivetti-width-repeat-map)) |
Beta Was this translation helpful? Give feedback.
Answered by
kotatsuyaki
Dec 30, 2023
Replies: 1 comment
-
Sorry for the noise, and |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kotatsuyaki
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry for the noise, and
repeat-mode
actually works fine with meow. My confusion was caused by a typo in my snippet above—the finalmap
is wrongly put outside the let form, causing it to error (as it's void) when I tested it with meow.