[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master f5a21db 157/272: ivy.el: define setq-local and defvar-loca
From: |
Oleh Krehel |
Subject: |
[elpa] master f5a21db 157/272: ivy.el: define setq-local and defvar-local unless defined |
Date: |
Mon, 25 Apr 2016 10:13:23 +0000 |
branch: master
commit f5a21db923dac0193f9417f1e88bf84b0a89e7b8
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el: define setq-local and defvar-local unless defined
Fixes #415
With this commit, ivy works on emacs-24.2.
---
counsel.el | 2 +-
ivy.el | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index 6cca45c..0d062c1 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1189,7 +1189,7 @@ INITIAL-INPUT can be given as the initial minibuffer
input."
"Format string to use in `cousel-ag-function' to construct the
command. %S will be replaced by the regex string. The default is
\"ag --vimgrep %S\"."
- :type 'stringp
+ :type 'string
:group 'ivy)
(defun counsel-ag-function (string)
diff --git a/ivy.el b/ivy.el
index 9d79617..60c20a6 100644
--- a/ivy.el
+++ b/ivy.el
@@ -387,6 +387,18 @@ When non-nil, it should contain at least one %d.")
(defvar Info-current-file)
+(eval-and-compile
+ (unless (fboundp 'defvar-local)
+ (defmacro defvar-local (var val &optional docstring)
+ "Define VAR as a buffer-local variable with default value VAL."
+ (declare (debug defvar) (doc-string 3))
+ (list 'progn (list 'defvar var val docstring)
+ (list 'make-variable-buffer-local (list 'quote var)))))
+ (unless (fboundp 'setq-local)
+ (defmacro setq-local (var val)
+ "Set variable VAR to value VAL in current buffer."
+ (list 'set (list 'make-local-variable (list 'quote var)) val))))
+
(defmacro ivy-quit-and-run (&rest body)
"Quit the minibuffer and run BODY afterwards."
`(progn
- [elpa] master 4af5c2e 115/272: Add `counsel-locate-cmd-mdfind`, (continued)
- [elpa] master 4af5c2e 115/272: Add `counsel-locate-cmd-mdfind`, Oleh Krehel, 2016/04/25
- [elpa] master 022e658 090/272: When in prog-mode, "M-n" should wrap input with "\b", Oleh Krehel, 2016/04/25
- [elpa] master 9db8308 103/272: counsel.el: Organize the file with outlines, Oleh Krehel, 2016/04/25
- [elpa] master 1c04fb8 126/272: Add ivy-fixed-height-minibuffer, Oleh Krehel, 2016/04/25
- [elpa] master 7a0b243 130/272: Give ivy-read-read-action enough minibuffer space, Oleh Krehel, 2016/04/25
- [elpa] master 708ca11 141/272: ivy.el: Fix a few face declarations, Oleh Krehel, 2016/04/25
- [elpa] master f647bca 136/272: Simplify the ivy-format-function interface, Oleh Krehel, 2016/04/25
- [elpa] master c2b330b 091/272: doc/ivy.org: Add @vindex and @kindex automatically, Oleh Krehel, 2016/04/25
- [elpa] master 4c99ec6 107/272: counsel.el: Shuffle functions, Oleh Krehel, 2016/04/25
- [elpa] master 0fd6a75 142/272: Move switch-to-buffer to :display-transformer-fn, Oleh Krehel, 2016/04/25
- [elpa] master f5a21db 157/272: ivy.el: define setq-local and defvar-local unless defined,
Oleh Krehel <=
- [elpa] master 71644d9 190/272: ivy.el (ivy-read): Remove code that sets action index to 1, Oleh Krehel, 2016/04/25
- [elpa] master 220fd38 079/272: doc/ivy.org: Improve the markup, Oleh Krehel, 2016/04/25
- [elpa] master 50f3092 169/272: counsel.el (counsel--async-sentinel): Start refactor, Oleh Krehel, 2016/04/25
- [elpa] master 41b8b0d 113/272: ivy.el (ivy-occur): Add a warning, Oleh Krehel, 2016/04/25
- [elpa] master b39e449 228/272: counsel.el (counsel-ag-map): Add, Oleh Krehel, 2016/04/25
- [elpa] master 79f9cda 165/272: counsel-ag: Fix escaping problem, Oleh Krehel, 2016/04/25
- [elpa] master f1c7233 164/272: swiper.el (swiper-occur): Bind ivy--regex-function, Oleh Krehel, 2016/04/25
- [elpa] master 1de78f3 160/272: Improve window handling for ivy-occur, Oleh Krehel, 2016/04/25
- [elpa] master c90784d 087/272: doc/ivy.org: Update, Oleh Krehel, 2016/04/25
- [elpa] master d085765 146/272: ivy.el (ivy-switch-buffer): Don't fall back to switch-to-buffer, Oleh Krehel, 2016/04/25