;; (define-key ctl-x-map "U" 'undo-only)
(defvar-keymap undo-repeat-map
:doc "Keymap to repeat undo key sequences \\`C-x u u'. Used in `repeat-mode'."
+ :repeat t
"u" #'undo)
-(put 'undo 'repeat-map 'undo-repeat-map)
(define-key global-map '[(control ??)] 'undo-redo)
(define-key global-map [?\C-\M-_] 'undo-redo)
(defvar-keymap buffer-navigation-repeat-map
:doc "Keymap to repeat `next-buffer' and `previous-buffer'. Used in `repeat-mode'."
+ :repeat t
"<right>" #'next-buffer
"<left>" #'previous-buffer)
-(put 'next-buffer 'repeat-map 'buffer-navigation-repeat-map)
-(put 'previous-buffer 'repeat-map 'buffer-navigation-repeat-map)
-
(let ((map minibuffer-local-map))
(define-key map "\en" 'next-history-element)
(define-key map [next] 'next-history-element)
(defvar-keymap next-error-repeat-map
:doc "Keymap to repeat `next-error' key sequences. Used in `repeat-mode'."
+ :repeat t
"n" #'next-error
"M-n" #'next-error
"p" #'previous-error
"M-p" #'previous-error)
-(put 'next-error 'repeat-map 'next-error-repeat-map)
-(put 'previous-error 'repeat-map 'next-error-repeat-map)
(defvar-keymap goto-map
:doc "Keymap for navigation commands."
(defvar-keymap page-navigation-repeat-map
:doc "Keymap to repeat page navigation key sequences. Used in `repeat-mode'."
+ :repeat t
"]" #'forward-page
"[" #'backward-page)
-(put 'forward-page 'repeat-map 'page-navigation-repeat-map)
-(put 'backward-page 'repeat-map 'page-navigation-repeat-map)
-
(define-key ctl-x-map "\C-p" 'mark-page)
(define-key ctl-x-map "l" 'count-lines-page)
(define-key ctl-x-map "np" 'narrow-to-page)
(defvar-keymap comint-repeat-map
:doc "Keymap to repeat comint key sequences. Used in `repeat-mode'."
+ :repeat t
"C-n" #'comint-next-prompt
"C-p" #'comint-previous-prompt)
-(put #'comint-next-prompt 'repeat-map 'comint-repeat-map)
-(put #'comint-previous-prompt 'repeat-map 'comint-repeat-map)
-
;; Fixme: Is this still relevant?
(defvar comint-ptyp t
"Non-nil if communications via pty; false if by pipe. Buffer local.
(defvar-keymap dired-jump-map
:doc "Keymap to repeat `dired-jump'. Used in `repeat-mode'."
+ :repeat t
"j" #'dired-jump
"C-j" #'dired-jump)
-(put 'dired-jump 'repeat-map 'dired-jump-map)
\f
;;; Miscellaneous commands
(defvar-keymap eshell-prompt-repeat-map
:doc "Keymap to repeat eshell-prompt key sequences. Used in `repeat-mode'."
+ :repeat t
"C-n" #'eshell-next-prompt
"C-p" #'eshell-previous-prompt)
-(put #'eshell-next-prompt 'repeat-map 'eshell-prompt-repeat-map)
-(put #'eshell-previous-prompt 'repeat-map 'eshell-prompt-repeat-map)
-
;;; Functions:
(define-minor-mode eshell-prompt-mode
(defvar-keymap eshell-command-repeat-map
:doc "Keymap to repeat eshell-command key sequences. Used in `repeat-mode'."
+ :repeat t
"C-f" #'eshell-forward-argument
"C-b" #'eshell-backward-argument)
-(put #'eshell-forward-argument 'repeat-map 'eshell-command-repeat-map)
-(put #'eshell-backward-argument 'repeat-map 'eshell-command-repeat-map)
-
;;; User Functions:
(defun eshell-kill-buffer-function ()
`(defvar ,variable-name
(define-keymap ,@(nreverse opts) ,@defs)
,@(and doc (list doc)))))
- (if repeat
+ (if props
`(progn
,defvar-form
,@(nreverse props))
\f
(defvar-keymap outline-navigation-repeat-map
+ :repeat t
"C-b" #'outline-backward-same-level
"b" #'outline-backward-same-level
"C-f" #'outline-forward-same-level
"C-u" #'outline-up-heading
"u" #'outline-up-heading)
-(dolist (command '(outline-backward-same-level
- outline-forward-same-level
- outline-next-visible-heading
- outline-previous-visible-heading
- outline-up-heading))
- (put command 'repeat-map 'outline-navigation-repeat-map))
-
(defvar-keymap outline-editing-repeat-map
+ :repeat t
"C-v" #'outline-move-subtree-down
"v" #'outline-move-subtree-down
"C-^" #'outline-move-subtree-up
"C-<" #'outline-promote
"<" #'outline-promote)
-(dolist (command '(outline-move-subtree-down
- outline-move-subtree-up
- outline-demote
- outline-promote))
- (put command 'repeat-map 'outline-editing-repeat-map))
-
\f
(provide 'outline)
(provide 'noutline)
(defvar-keymap shell-repeat-map
:doc "Keymap to repeat shell key sequences. Used in `repeat-mode'."
+ :repeat t
"C-f" #'shell-forward-command
"C-b" #'shell-backward-command)
-(put #'shell-forward-command 'repeat-map 'shell-repeat-map)
-(put #'shell-backward-command 'repeat-map 'shell-repeat-map)
-
(defcustom shell-mode-hook '()
"Hook for customizing Shell mode."
:type 'hook
(defvar-keymap tab-bar-switch-repeat-map
:doc "Keymap to repeat tab switch key sequences \\`C-x t o o O'.
Used in `repeat-mode'."
+ :repeat t
"o" #'tab-next
"O" #'tab-previous)
-(put 'tab-next 'repeat-map 'tab-bar-switch-repeat-map)
-(put 'tab-previous 'repeat-map 'tab-bar-switch-repeat-map)
(defvar-keymap tab-bar-move-repeat-map
:doc "Keymap to repeat tab move key sequences \\`C-x t m m M'.
Used in `repeat-mode'."
+ :repeat t
"m" #'tab-move
"M" #'tab-bar-move-tab-backward)
-(put 'tab-move 'repeat-map 'tab-bar-move-repeat-map)
-(put 'tab-bar-move-tab-backward 'repeat-map 'tab-bar-move-repeat-map)
\f
(provide 'tab-bar)
(defvar-keymap other-window-repeat-map
:doc "Keymap to repeat `other-window' key sequences.
Used in `repeat-mode'."
+ :repeat t
"o" #'other-window
"O" (lambda ()
(interactive)
(setq repeat-map 'other-window-repeat-map)
(other-window -1)))
-(put 'other-window 'repeat-map 'other-window-repeat-map)
(defvar-keymap resize-window-repeat-map
:doc "Keymap to repeat window resizing commands.
Used in `repeat-mode'."
+ :repeat t
;; Standard keys:
"^" #'enlarge-window
"}" #'enlarge-window-horizontally
"{" #'shrink-window-horizontally
;; Additional keys:
"v" #'shrink-window)
-(put 'enlarge-window 'repeat-map 'resize-window-repeat-map)
-(put 'enlarge-window-horizontally 'repeat-map 'resize-window-repeat-map)
-(put 'shrink-window-horizontally 'repeat-map 'resize-window-repeat-map)
-(put 'shrink-window 'repeat-map 'resize-window-repeat-map)
(defvar-keymap window-prefix-map
:doc "Keymap for subcommands of \\`C-x w'."
(defvar-keymap winner-repeat-map
:doc "Keymap to repeat winner key sequences. Used in `repeat-mode'."
+ :repeat t
"<left>" #'winner-undo
"<right>" #'winner-redo)
-(put #'winner-undo 'repeat-map 'winner-repeat-map)
-(put #'winner-redo 'repeat-map 'winner-repeat-map)
-
\f
;;;###autoload
(define-minor-mode winner-mode