summaryrefslogtreecommitdiff
path: root/helm-misc.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2020-07-28 09:20:44 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2020-07-28 09:20:44 +0200
commiteaec644514c60ba39d9366759f4b4e419d0d871e (patch)
tree9fb310dee5b9891b538a8f7c7e2998ba80ab2ee4 /helm-misc.el
parent81f07075299ee7c9234dcb73fab1e59f9f9b1044 (diff)
Move helm-minibuffer-history-key to helm-misc
Diffstat (limited to 'helm-misc.el')
-rw-r--r--helm-misc.el26
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
;;