diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2020-07-28 09:20:44 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2020-07-28 09:20:44 +0200 |
commit | eaec644514c60ba39d9366759f4b4e419d0d871e (patch) | |
tree | 9fb310dee5b9891b538a8f7c7e2998ba80ab2ee4 /helm-misc.el | |
parent | 81f07075299ee7c9234dcb73fab1e59f9f9b1044 (diff) |
Move helm-minibuffer-history-key to helm-misc
Diffstat (limited to 'helm-misc.el')
-rw-r--r-- | helm-misc.el | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/helm-misc.el b/helm-misc.el index 2d278424..b855cf9f 100644 --- a/helm-misc.el +++ b/helm-misc.el @@ -205,6 +205,32 @@ It is added to `extended-command-history'. (const :tag "Confirm" 'confirm) (const :tag "Always allow" nil))) +(defcustom helm-minibuffer-history-key "C-r" + "The key `helm-minibuffer-history' is bound to in minibuffer local maps." + :type '(choice (string :tag "Key") (const :tag "no binding")) + :group 'helm-misc + :set + (lambda (var key) + (cl-dolist (map '(minibuffer-local-completion-map + minibuffer-local-filename-completion-map + minibuffer-local-filename-must-match-map ; Emacs 23.1.+ + minibuffer-local-isearch-map + minibuffer-local-map + minibuffer-local-must-match-filename-map ; Older Emacsen + minibuffer-local-must-match-map + minibuffer-local-ns-map)) + (let ((vmap (symbol-value map))) + (when (and (boundp map) (keymapp vmap)) + (let ((val (and (boundp var) (symbol-value var)))) + (when val + (define-key vmap + (if (stringp val) (read-kbd-macro val) val) + nil))) + (when key + (define-key (symbol-value map) + (if (stringp key) (read-kbd-macro key) key) + 'helm-minibuffer-history))))) + (set var key))) ;;; Helm ratpoison UI ;; |