diff options
author | JSDurand <mmemmew@gmail.com> | 2023-06-17 15:06:16 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-06-17 15:06:16 +0800 |
commit | c0af15279da1bc2e3e7b379027fb82d89e90842c (patch) | |
tree | 73805c92dac55623e074eef1079a632230b14704 /common.el | |
parent | 8a11e4e714fb8f6ae93eb653056caf186c782b2d (diff) |
common: Bind point-to-register to a more convenient key
* common.el (register-val-jump-to): Do not ask for confirmation to
visit files again. This was enabled to send to others, and I forgot
to modify that back.
(ctl-x-r-map): Bind point-to-register to a more convenient key. I am
tired of typing 'C-x r C-x @ c @' to add a point to a register.
Another binding involves the space key, and I would like to have an
alternative convenient key-binding that does not involve the space
key, as I find that the space key is pressed way too oft. Haha!
Diffstat (limited to 'common.el')
-rw-r--r-- | common.el | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -332,9 +332,7 @@ mark at the end for the first yank." (require 'bookmark) (bookmark-jump (cdr val))) ((eq (car val) 'file-query) - (or (find-buffer-visiting (nth 1 val)) - (y-or-n-p (format "Visit file %s again? " (nth 1 val))) - (user-error "Register access aborted")) + (find-buffer-visiting (nth 1 val)) (find-file (nth 1 val)) (goto-char (nth 2 val))) (t (cl-call-next-method val delete)))) @@ -424,6 +422,10 @@ mark at the end for the first yank." (princ "a rectangle starting with ") (princ (car val)))))) +;;; Bind point-to-register to a more convenient key + +(define-key ctl-x-r-map (vector ?p) #'point-to-register) + ;;; Intentionally disable some key-bindings. ;; Using byte-code is fun. |