[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 340318d 044/167: ivy-count-format must be an empty string
From: |
Oleh Krehel |
Subject: |
[elpa] master 340318d 044/167: ivy-count-format must be an empty string instead of nil |
Date: |
Tue, 08 Dec 2015 10:49:48 +0000 |
branch: master
commit 340318dc9c9f9ce514e515dc5bddb16b0026a617
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy-count-format must be an empty string instead of nil
Using an empty string is easier. No longer needed to check for nil when
using `string-match', `concat' etc.
* doc/Changelog.org: Update.
* ivy.el (ivy-count-format): Update doc and customize type.
(ivy--reset-state): Error if `ivy-count-format' nil is encountered.
Fixes #257
Re #188
---
doc/Changelog.org | 2 +-
ivy.el | 11 ++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/doc/Changelog.org b/doc/Changelog.org
index 0f5ac2c..94f122f 100644
--- a/doc/Changelog.org
+++ b/doc/Changelog.org
@@ -65,7 +65,7 @@ To have this feature, use something like this:
#+end_src
See [[https://github.com/abo-abo/swiper/pull/167][#167]].
-You can also set this to nil, if you don't want any count, see
[[https://github.com/abo-abo/swiper/pull/188][#188]].
+You can also set this to "", if you don't want any count, see
[[https://github.com/abo-abo/swiper/pull/188][#188]].
**** Allow to add additional exit points for any command
Example for =ivy-switch-to-buffer=:
#+begin_src elisp
diff --git a/ivy.el b/ivy.el
index 9aaaf72..71d80cd 100644
--- a/ivy.el
+++ b/ivy.el
@@ -72,11 +72,11 @@
(defcustom ivy-count-format "%-4d "
"The style of showing the current candidate count for `ivy-read'.
-Set this to nil if you don't want the count. You can also set it
-to e.g. \"(%d/%d) \" if you want to see both the candidate index
-and the candidate count."
+Set this to \"\" if you don't want the count. You can also set
+it to e.g. \"(%d/%d) \" if you want to see both the candidate
+index and the candidate count."
:type '(choice
- (const :tag "Count disabled" nil)
+ (const :tag "Count disabled" "")
(const :tag "Count matches" "%-4d ")
(const :tag "Count matches and show current match" "(%d/%d) ")
string))
@@ -1111,7 +1111,8 @@ This is useful for recursive `ivy-read'."
(cond ((string-match "%.*d" prompt)
prompt)
((null ivy-count-format)
- nil)
+ (error
+ "`ivy-count-format' can't be nil. Set it to an empty string
instead."))
((string-match "%d.*%d" ivy-count-format)
(let ((w (length (number-to-string
(length ivy--all-candidates))))
- [elpa] master 126158d 025/167: ivy.el (ivy--filter): Anchor only for swiper, (continued)
- [elpa] master 126158d 025/167: ivy.el (ivy--filter): Anchor only for swiper, Oleh Krehel, 2015/12/08
- [elpa] master 800e640 028/167: Fix "M-o k" when switching buffers, Oleh Krehel, 2015/12/08
- [elpa] master b9d0502 026/167: ivy.el (ivy--filter): Fix typo, Oleh Krehel, 2015/12/08
- [elpa] master 6956311 027/167: Adjust ivy-state-preselect for file name completion, Oleh Krehel, 2015/12/08
- [elpa] master 6f4d46b 034/167: Fix preselect for input "^", Oleh Krehel, 2015/12/08
- [elpa] master ef189f1 030/167: ivy.el (ivy-count-format): Extend customize choices, Oleh Krehel, 2015/12/08
- [elpa] master e722d6a 046/167: swiper.el (swiper-mc): Add and bind to "C-7", Oleh Krehel, 2015/12/08
- [elpa] master 3a3b052 036/167: swiper.el: Add a lot of avy declares, Oleh Krehel, 2015/12/08
- [elpa] master 3699fa9 041/167: Don't reset the match to first if the current one still works, Oleh Krehel, 2015/12/08
- [elpa] master 877648a 045/167: ivy.el (ivy-case-fold-search): New defvar, Oleh Krehel, 2015/12/08
- [elpa] master 340318d 044/167: ivy-count-format must be an empty string instead of nil,
Oleh Krehel <=
- [elpa] master 9cc75eb 050/167: Adjust the swiper regexp builder for the display change, Oleh Krehel, 2015/12/08
- [elpa] master 85682ee 048/167: Fix "C-x h" selection and "C-b" bug, Oleh Krehel, 2015/12/08
- [elpa] master 99698e6 035/167: ivy.el (ivy-dispatching-call): Add and bind to "C-M-o", Oleh Krehel, 2015/12/08
- [elpa] master 0630395 043/167: Fix the count when git-grep for "->foo", Oleh Krehel, 2015/12/08
- [elpa] master 4045349 032/167: ivy.el (ivy-use-virtual-buffers): Update docstring, Oleh Krehel, 2015/12/08
- [elpa] master f9df75e 037/167: ivy.el (ivy-index-functions-alist): New variable, Oleh Krehel, 2015/12/08
- [elpa] master 6e3c692 029/167: Fix ivy-state-preselect for file name completion, Oleh Krehel, 2015/12/08
- [elpa] master c69b4b6 033/167: ivy.el (ivy-last): Update docstring, Oleh Krehel, 2015/12/08
- [elpa] master b6d476a 042/167: ivy.el (ivy--recompute-index): Fixup, Oleh Krehel, 2015/12/08
- [elpa] master 83f704b 039/167: ivy-hydra.el (hydra-ivy): Make the docstring a rectangle, Oleh Krehel, 2015/12/08