[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 80c2669 142/184: ivy.el (ivy--alist-set): Work-around emac
From: |
Oleh Krehel |
Subject: |
[elpa] master 80c2669 142/184: ivy.el (ivy--alist-set): Work-around emacs-24.3 not having alist-get |
Date: |
Wed, 16 Oct 2019 13:15:10 -0400 (EDT) |
branch: master
commit 80c266983422f777416e1639ebe9b5dbb37a3603
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy--alist-set): Work-around emacs-24.3 not having alist-get
---
ivy.el | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/ivy.el b/ivy.el
index bf5bdaf..cc93077 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1908,6 +1908,13 @@ May supersede `ivy-initial-inputs-alist'."
(defvar ivy-unwind-fns-alist nil
"An alist associating commands to their :unwind values.")
+(defun ivy--alist-set (alist-sym key val)
+ (let ((cell (assoc key (symbol-value alist-sym))))
+ (if cell
+ (setcdr cell val)
+ (set alist-sym (cons (cons key val)
+ (symbol-value alist-sym))))))
+
(cl-defun ivy-configure (caller
&key
initial-input
@@ -1918,15 +1925,15 @@ May supersede `ivy-initial-inputs-alist'."
"Configure `ivy-read' params for CALLER."
(declare (indent 1))
(when initial-input
- (setf (alist-get caller ivy-initial-inputs-alist) initial-input))
+ (ivy--alist-set 'ivy-initial-inputs-alist caller initial-input))
(when occur
(ivy-set-occur caller occur))
(when update-fn
- (setf (alist-get caller ivy-update-fns-alist) update-fn))
+ (ivy--alist-set 'ivy-update-fns-alist caller update-fn))
(when unwind-fn
- (setf (alist-get caller ivy-unwind-fns-alist) unwind-fn))
+ (ivy--alist-set 'ivy-unwind-fns-alist caller unwind-fn))
(when more-chars
- (setf (alist-get caller ivy-more-chars-alist) more-chars)))
+ (ivy--alist-set 'ivy-more-chars-alist caller more-chars)))
(defcustom ivy-sort-max-size 30000
"Sorting won't be done for collections larger than this."
- [elpa] master cdca2fc 141/184: counsel.el (counsel-switch-buffer): Re-use ivy-switch-buffer, (continued)
- [elpa] master cdca2fc 141/184: counsel.el (counsel-switch-buffer): Re-use ivy-switch-buffer, Oleh Krehel, 2019/10/16
- [elpa] master a5701a9 159/184: ivy.el (ivy-configure): Add :format-fn, Oleh Krehel, 2019/10/16
- [elpa] master 4d533b2 178/184: counsel.el (counsel-dired): Filter to directories only, Oleh Krehel, 2019/10/16
- [elpa] master ec1ed07 171/184: counsel.el (counsel--find-file-1): Use dired-current-directory for dired, Oleh Krehel, 2019/10/16
- [elpa] master 1d8803e 181/184: Ensure that ripgrep on windows uses '/' as the path-separator, Oleh Krehel, 2019/10/16
- [elpa] master 7854d03 129/184: counsel.el (counsel-google): Add, Oleh Krehel, 2019/10/16
- [elpa] master cd634c6 183/184: doc/Changelog.org: Release 0.13.0, Oleh Krehel, 2019/10/16
- [elpa] master 0dfd70d 135/184: counsel.el (counsel-google-function): Require json, Oleh Krehel, 2019/10/16
- [elpa] master eed1f06 138/184: counsel.el (counsel--py-action): Don't auto-insert parens, Oleh Krehel, 2019/10/16
- [elpa] master 52295c4 137/184: swiper.el (swiper-isearch): Fix searching for "$^", Oleh Krehel, 2019/10/16
- [elpa] master 80c2669 142/184: ivy.el (ivy--alist-set): Work-around emacs-24.3 not having alist-get,
Oleh Krehel <=
- [elpa] master 8b07572 149/184: ivy.el (ivy-configure): Add :display-transformer-fn, Oleh Krehel, 2019/10/16
- [elpa] master 9da8003 158/184: counsel.el (counsel-M-x): Don't sort by default, Oleh Krehel, 2019/10/16
- [elpa] master 8f08f38 155/184: counsel.el (counsel--grep-last-pos): Refactor from counsel-grep-last-line, Oleh Krehel, 2019/10/16
- [elpa] master 6b40d40 156/184: ivy.el (ivy--occur-press-update-window): Re-use ivy-highlight-grep-commands, Oleh Krehel, 2019/10/16
- [elpa] master 2ed4416 165/184: ivy.el (ivy-configure): Add :exit-codes, Oleh Krehel, 2019/10/16
- [elpa] master 2ce5450 177/184: counsel.el (counsel-find-file): Bind "M-o R" to find-file-read-only, Oleh Krehel, 2019/10/16
- [elpa] master c82b852 174/184: ivy.el (ivy-occur-revert-buffer): Simplify, Oleh Krehel, 2019/10/16
- [elpa] master 8bc23e6 104/184: counsel.el (counsel-compile): delete duplicates, Oleh Krehel, 2019/10/16
- [elpa] master 966525c 118/184: counsel.el (counsel-cd): Fix for counsel-ag, Oleh Krehel, 2019/10/16
- [elpa] master f628569 127/184: Make ivy--magic-file-slash less aggressive, Oleh Krehel, 2019/10/16