[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 6f04865 185/395: ivy.el (ivy-init-fns-alist):
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 6f04865 185/395: ivy.el (ivy-init-fns-alist): Add |
Date: |
Thu, 25 Feb 2021 08:31:59 -0500 (EST) |
branch: externals/ivy-hydra
commit 6f0486540c1bafc835531962f79751fb45043210
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
ivy.el (ivy-init-fns-alist): Add
---
ivy.el | 35 +++++++++++++++++++++++------------
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/ivy.el b/ivy.el
index ca70f79..e71fd27 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2001,6 +2001,11 @@ May supersede `ivy-initial-inputs-alist'."
(defvar ivy-unwind-fns-alist nil
"An alist associating commands to their :unwind values.")
+(defvar ivy-init-fns-alist nil
+ "An alist associating commands to their :init values.
+An :init is a function with no arguments.
+`ivy-read' calls it to initialize.")
+
(defun ivy--alist-set (alist-sym key val)
(let ((cell (assoc key (symbol-value alist-sym))))
(if cell
@@ -2012,18 +2017,19 @@ May supersede `ivy-initial-inputs-alist'."
(cl-defun ivy-configure (caller
&key
- initial-input
- height
- occur
- update-fn
- unwind-fn
- index-fn
- sort-fn
- format-fn
- display-transformer-fn
- more-chars
- grep-p
- exit-codes)
+ initial-input
+ height
+ occur
+ update-fn
+ init-fn
+ unwind-fn
+ index-fn
+ sort-fn
+ format-fn
+ display-transformer-fn
+ more-chars
+ grep-p
+ exit-codes)
"Configure `ivy-read' params for CALLER."
(declare (indent 1))
(when initial-input
@@ -2036,6 +2042,8 @@ May supersede `ivy-initial-inputs-alist'."
(ivy--alist-set 'ivy-update-fns-alist caller update-fn))
(when unwind-fn
(ivy--alist-set 'ivy-unwind-fns-alist caller unwind-fn))
+ (when init-fn
+ (ivy--alist-set 'ivy-init-fns-alist caller init-fn))
(when index-fn
(ivy--alist-set 'ivy-index-functions-alist caller index-fn))
(when sort-fn
@@ -2196,6 +2204,9 @@ session-specific data.
CALLER is a symbol to uniquely identify the caller to `ivy-read'.
It is used, along with COLLECTION, to determine which
customizations apply to the current completion session."
+ (let ((init-fn (ivy-alist-setting ivy-init-fns-alist caller)))
+ (when init-fn
+ (funcall init-fn)))
;; get un-stuck from an existing `read-key' overriding minibuffer keys
(when (equal overriding-local-map '(keymap))
(keyboard-quit))
- [elpa] externals/ivy-hydra 068ed9c 131/395: counsel-kmacro: Clarify Emacs's behavior regarding counter initial values., (continued)
- [elpa] externals/ivy-hydra 068ed9c 131/395: counsel-kmacro: Clarify Emacs's behavior regarding counter initial values., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 56807a1 134/395: counsel.el (counsel-recentf): Add "d" action, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7084d60 154/395: counsel.el (counsel-cd): Default to the directory of the current buffer, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra fcf5dcf 159/395: ivy.el (ivy--compute-extra-actions): Use the provided doc for "o", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e7cc776 174/395: swiper.el (swiper-verbose): New defcustom, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 2894f11 177/395: ivy.el (magic-slash): comment out windows behaviour, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 742119a 181/395: counsel.el (counsel-tracker): New command, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 9ccd93b 191/395: ivy-hydra.el (ivy-hydra-read-action): Work for "C-M-o", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra bba92e0 188/395: counsel.el (counsel-file-name-filter-alist): Modify perl entry, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 64f05f4 189/395: swiper.el (swiper-font-lock-exclude): Add sieve-mode, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6f04865 185/395: ivy.el (ivy-init-fns-alist): Add,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 1b426e1 202/395: Fix byte-compilation warning in Emacs 28, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f9fa30d 211/395: More compatibility fixes, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 48e56da 305/395: Extend :type of counsel-async-command-delay, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 0eebf24 318/395: ivy.el (ivy--partial-cd-for-single-directory): Fix for ignore-order, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra edefba7 304/395: ivy-test.el (ivy-read-alist-multi-cands): Add test, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra aa47396 218/395: counsel.el (counsel-fonts): Preselect the current font, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 2bf7317 235/395: ivy.el: ivy--index should never be nil, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 33fa992 250/395: Fix swiper handling of bol regex, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6ab24b6 249/395: * ivy.el: Use with-eval-after-load, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ffa5a5f 258/395: counsel-describe-symbol: autoload, Basil L. Contovounesios, 2021/02/25