diff options
| author | Visuwesh <visuweshm@gmail.com> | 2023-10-26 10:08:26 +0530 |
|---|---|---|
| committer | Philip Kaludercic <philipk@posteo.net> | 2023-10-27 08:35:02 +0200 |
| commit | b607434773c4b30007dbfab978385dabe745937e (patch) | |
| tree | 7e2cc2373883d60e4a463780e139d6dfd6857adb | |
| parent | 3244b2a765315ad640deab34b1b2f90ac2277df3 (diff) | |
Allow the quick-confirm key to be customizable
* do-at-point.el (do-at-point-quick-confirm-key): New defcustom to
specify the binding for quick confirm.
(do-at-point--next-thing): Use it.
| -rw-r--r-- | do-at-point.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/do-at-point.el b/do-at-point.el index 9101826..3600bd4 100644 --- a/do-at-point.el +++ b/do-at-point.el @@ -166,6 +166,12 @@ Quick bindings allow for the user to operate on a selection without having to have confirmed the first." :type 'boolean) +(defcustom do-at-point-quick-confirm-key (kbd "<return>") + "The key to bind the quick confirm command to. +See `do-at-point-quick-bindings' for the meaning of quick +confirm." + :type 'key-sequence) + (defcustom do-at-point-selection-face 'highlight "Face to use to highlight the selected thing." :type 'face) @@ -286,7 +292,7 @@ value of the function is always the new \"thing\"." (when do-at-point-quick-bindings (dolist (key (mapcar #'car (do-at-point--actions thing))) (define-key do-at-point--quick-map (vector key) #'do-at-point-confirm)) - (define-key do-at-point--quick-map (kbd "<return>") + (define-key do-at-point--quick-map do-at-point-quick-confirm-key #'do-at-point-confirm-quick)) (let ((default (cadar (do-at-point--actions thing)))) (message |
