[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c5661c0 162/167: ivy.el (ivy-completing-read): Use complet
From: |
Oleh Krehel |
Subject: |
[elpa] master c5661c0 162/167: ivy.el (ivy-completing-read): Use completing-read-default for tmm |
Date: |
Tue, 08 Dec 2015 10:50:45 +0000 |
branch: master
commit c5661c01cb69741777a720140d2e6b2db05d489d
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-completing-read): Use completing-read-default for tmm
Fixes #316
---
ivy.el | 60 ++++++++++++++++++++++++++++++++----------------------------
1 files changed, 32 insertions(+), 28 deletions(-)
diff --git a/ivy.el b/ivy.el
index 7d25c50..5127582 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1292,7 +1292,7 @@ This is useful for recursive `ivy-read'."
;;;###autoload
(defun ivy-completing-read (prompt collection
&optional predicate require-match initial-input
- history def _inherit-input-method)
+ history def inherit-input-method)
"Read a string in the minibuffer, with completion.
This interface conforms to `completing-read' and can be used for
@@ -1305,33 +1305,37 @@ REQUIRE-MATCH is specified with a boolean value. See
`completing-read'.
INITIAL-INPUT is a string that can be inserted into the minibuffer initially.
HISTORY is a list of previously selected inputs.
DEF is the default value.
-_INHERIT-INPUT-METHOD is currently ignored."
-
- ;; See the doc of `completing-read'.
- (when (consp history)
- (when (numberp (cdr history))
- (setq initial-input (nth (1- (cdr history))
- (symbol-value (car history)))))
- (setq history (car history)))
- (ivy-read (replace-regexp-in-string "%" "%%" prompt)
- collection
- :predicate predicate
- :require-match require-match
- :initial-input (if (consp initial-input)
- (car initial-input)
- (if (and (stringp initial-input)
- (string-match "\\+" initial-input))
- (replace-regexp-in-string
- "\\+" "\\\\+" initial-input)
- initial-input))
- :preselect (if (listp def) (car def) def)
- :history history
- :keymap nil
- :sort
- (let ((sort (assoc this-command ivy-sort-functions-alist)))
- (if sort
- (cdr sort)
- t))))
+INHERIT-INPUT-METHOD is currently ignored."
+ (if (memq this-command '(tmm-menubar tmm-shortcut))
+ (completing-read-default prompt collection
+ predicate require-match
+ initial-input history
+ def inherit-input-method)
+ ;; See the doc of `completing-read'.
+ (when (consp history)
+ (when (numberp (cdr history))
+ (setq initial-input (nth (1- (cdr history))
+ (symbol-value (car history)))))
+ (setq history (car history)))
+ (ivy-read (replace-regexp-in-string "%" "%%" prompt)
+ collection
+ :predicate predicate
+ :require-match require-match
+ :initial-input (if (consp initial-input)
+ (car initial-input)
+ (if (and (stringp initial-input)
+ (string-match "\\+" initial-input))
+ (replace-regexp-in-string
+ "\\+" "\\\\+" initial-input)
+ initial-input))
+ :preselect (if (listp def) (car def) def)
+ :history history
+ :keymap nil
+ :sort
+ (let ((sort (assoc this-command ivy-sort-functions-alist)))
+ (if sort
+ (cdr sort)
+ t)))))
;;;###autoload
(define-minor-mode ivy-mode
- [elpa] master 5cfe6e6 148/167: Fixes on the previous docstring edits, (continued)
- [elpa] master 5cfe6e6 148/167: Fixes on the previous docstring edits, Oleh Krehel, 2015/12/08
- [elpa] master 435e9d4 159/167: Use :caller for ivy-re-builders-alist, Oleh Krehel, 2015/12/08
- [elpa] master 8dd88e4 149/167: doc/Changelog.org: Update up to 2bec99d, Oleh Krehel, 2015/12/08
- [elpa] master 706349f 160/167: swiper.el (swiper-font-lock-ensure): Add vc-dir-mode, Oleh Krehel, 2015/12/08
- [elpa] master 2a55ada 163/167: doc/Changelog.org: Update up to 706349f, Oleh Krehel, 2015/12/08
- [elpa] master 98a4548 164/167: swiper.el: Bump version to 0.7.0, Oleh Krehel, 2015/12/08
- [elpa] master 84533bb 139/167: Minor fixes to ivy.org and export to ivy.texi, Oleh Krehel, 2015/12/08
- [elpa] master 17872ba 157/167: ivy.el: Structure all faces into ivy-faces custom group, Oleh Krehel, 2015/12/08
- [elpa] master 5a6217a 161/167: counsel.el (counsel-tmm): New command, Oleh Krehel, 2015/12/08
- [elpa] master e264139 166/167: doc/ivy.org: Add "Variable Index" node, Oleh Krehel, 2015/12/08
- [elpa] master c5661c0 162/167: ivy.el (ivy-completing-read): Use completing-read-default for tmm,
Oleh Krehel <=
- [elpa] master 1992f44 165/167: doc/ivy.texi: Re-export using adjusted texinfo exporter, Oleh Krehel, 2015/12/08
- [elpa] master 1f3fa31 167/167: Merge commit 'e264139e7fafbd1bbb68f9cef6d1c50b8e6cf1f3' from swiper, Oleh Krehel, 2015/12/08