|
|
@ -360,5 +360,29 @@ there's a region, all lines that region covers will be duplicated." |
|
|
(global-set-key [M-left] 'left-word) |
|
|
(global-set-key [M-left] 'left-word) |
|
|
(message "Arrow keys navigation in buffers in now allowed.")) |
|
|
(message "Arrow keys navigation in buffers in now allowed.")) |
|
|
|
|
|
|
|
|
|
|
|
(require 'repeat) |
|
|
|
|
|
|
|
|
|
|
|
(defun make-repeatable-command (cmd) |
|
|
|
|
|
"Returns a new command that is a repeatable version of CMD. |
|
|
|
|
|
The new command is named CMD-repeat. CMD should be a quoted |
|
|
|
|
|
command. |
|
|
|
|
|
|
|
|
|
|
|
This allows you to bind the command to a compound keystroke and |
|
|
|
|
|
repeat it with just the final key. For example: |
|
|
|
|
|
|
|
|
|
|
|
(global-set-key (kbd \"C-c a\") (make-repeatable-command 'foo)) |
|
|
|
|
|
|
|
|
|
|
|
will create a new command called foo-repeat. Typing C-c a will |
|
|
|
|
|
just invoke foo. Typing C-c a a a will invoke foo three times, |
|
|
|
|
|
and so on." |
|
|
|
|
|
(fset (intern (concat (symbol-name cmd) "-repeat")) |
|
|
|
|
|
`(lambda ,(help-function-arglist cmd) ;; arg list |
|
|
|
|
|
,(format "A repeatable version of `%s'." (symbol-name cmd)) ;; doc string |
|
|
|
|
|
,(interactive-form cmd) ;; interactive form |
|
|
|
|
|
;; see also repeat-message-function |
|
|
|
|
|
(setq last-repeatable-command ',cmd) |
|
|
|
|
|
(repeat nil))) |
|
|
|
|
|
(intern (concat (symbol-name cmd) "-repeat"))) |
|
|
|
|
|
|
|
|
(provide 'prelude-core) |
|
|
(provide 'prelude-core) |
|
|
;;; prelude-core.el ends here |
|
|
;;; prelude-core.el ends here |