Refactor +helm*replace-prompt
In case +helm-global-prompt is nil, which will effectively disable this advice.
This commit is contained in:
parent
1db3830bf3
commit
cdcc4eec5d
1 changed files with 5 additions and 4 deletions
|
@ -54,10 +54,11 @@
|
||||||
;;; Helm hacks
|
;;; Helm hacks
|
||||||
(defun +helm*replace-prompt (plist)
|
(defun +helm*replace-prompt (plist)
|
||||||
"Globally replace helm prompts with `+helm-global-prompt'."
|
"Globally replace helm prompts with `+helm-global-prompt'."
|
||||||
(if (keywordp (car plist))
|
(cond ((not +helm-global-prompt) plist)
|
||||||
(plist-put plist :prompt +helm-global-prompt)
|
((keywordp (car plist))
|
||||||
(setf (nth 2 plist) +helm-global-prompt)
|
(plist-put plist :prompt +helm-global-prompt))
|
||||||
plist))
|
((setf (nth 2 plist) +helm-global-prompt)
|
||||||
|
plist)))
|
||||||
(advice-add #'helm :filter-args #'+helm*replace-prompt)
|
(advice-add #'helm :filter-args #'+helm*replace-prompt)
|
||||||
|
|
||||||
(defun +helm*hide-header (&rest _)
|
(defun +helm*hide-header (&rest _)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue