[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 07/16: Deprecate setting company-idle-delay to t
From: |
Dmitry Gutov |
Subject: |
[elpa] 07/16: Deprecate setting company-idle-delay to t |
Date: |
Sat, 26 Jul 2014 04:53:21 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit 0862ff0ee468dbda41e7d3d2dc884d21fdbb2df2
Author: Dmitry Gutov <address@hidden>
Date: Sun Jul 20 04:57:32 2014 +0300
Deprecate setting company-idle-delay to t
---
NEWS.md | 4 ++++
company.el | 17 +++++++++--------
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index af8ea70..e547f79 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,9 @@
# History of user-visible changes
+## Next
+
+* Setting `company-idle-delay` to `t` is deprecated. Use the value 0 instead.
+
## 2014-07-01 (0.8.1)
* `company-require-match` is not in effect when the new input doesn't continue
diff --git a/company.el b/company.el
index 8707517..ceb815a 100644
--- a/company.el
+++ b/company.el
@@ -544,10 +544,10 @@ A character that is part of a valid candidate never
triggers auto-completion."
(defcustom company-idle-delay .5
"The idle delay in seconds until completion starts automatically.
-A value of nil means no idle completion, t means show candidates
-immediately when a prefix of `company-minimum-prefix-length' is reached."
+The prefix still has to satisfy `company-minimum-prefix-length' before that
+happens. The value of nil means no idle completion."
:type '(choice (const :tag "never (nil)" nil)
- (const :tag "immediate (t)" t)
+ (const :tag "immediate (0)" 0)
(number :tag "seconds")))
(defcustom company-begin-commands '(self-insert-command
org-self-insert-command)
@@ -692,6 +692,9 @@ keymap during active completions (`company-active-map'):
nil company-lighter company-mode-map
(if company-mode
(progn
+ (when (eq company-idle-delay t)
+ (setq company-idle-delay 0)
+ (warn "Setting `company-idle-delay' to t is deprecated. Set it to 0
instead."))
(add-hook 'pre-command-hook 'company-pre-command nil t)
(add-hook 'post-command-hook 'company-post-command nil t)
(mapc 'company-init-backend company-backends))
@@ -1010,7 +1013,7 @@ can retrieve meta-data for them."
candidate))
(defun company--should-complete ()
- (and (eq company-idle-delay t)
+ (and (eq company-idle-delay 'now)
(not (or buffer-read-only overriding-terminal-local-map
overriding-local-map))
;; Check if in the middle of entering a key combination.
@@ -1256,7 +1259,7 @@ from the rest of the back-ends in the group, if any, will
be left at the end."
(defun company-auto-begin ()
(and company-mode
(not company-candidates)
- (let ((company-idle-delay t))
+ (let ((company-idle-delay 'now))
(condition-case-unless-debug err
(company--perform)
(error (message "Company: An error occurred in auto-begin")
@@ -1508,9 +1511,7 @@ from the rest of the back-ends in the group, if any, will
be left at the end."
(condition-case err
(progn
(unless (equal (point) company-point)
- (let ((company-idle-delay (and (eq company-idle-delay t)
- (company--should-begin)
- t)))
+ (let (company-idle-delay) ; Against misbehavior while debugging.
(company--perform)))
(if company-candidates
(company-call-frontends 'post-command)
- [elpa] branch master updated (68ccff3 -> ca001a5), Dmitry Gutov, 2014/07/26
- [elpa] 03/16: company-pseudo-tooltip-frontend: Small rewrite, Dmitry Gutov, 2014/07/26
- [elpa] 06/16: +1 char, -1 line, Dmitry Gutov, 2014/07/26
- [elpa] 05/16: company-pseudo-tooltip-guard: Stabilize when the popup is displayed up, Dmitry Gutov, 2014/07/26
- [elpa] 09/16: company-sort-by-occurrence: continue search after predicate fails, Dmitry Gutov, 2014/07/26
- [elpa] 07/16: Deprecate setting company-idle-delay to t,
Dmitry Gutov <=
- [elpa] 08/16: company-sort-by-occurrence: allow customizing the weighing logic, Dmitry Gutov, 2014/07/26
- [elpa] 11/16: company-css-property-value-regexp: prohibit opening curlies, Dmitry Gutov, 2014/07/26
- [elpa] 13/16: Fix company-occurrence-weight-function, Dmitry Gutov, 2014/07/26
- [elpa] 12/16: company-css-property-values: delete duplicates, Dmitry Gutov, 2014/07/26
- [elpa] 10/16: company-capf: get rid of caching last capf-data, Dmitry Gutov, 2014/07/26
- [elpa] 14/16: Fix tests in batch mode, Dmitry Gutov, 2014/07/26
- [elpa] 01/16: company-frontends-set: never modify VALUE destructively, Dmitry Gutov, 2014/07/26
- [elpa] 15/16: Release 0.8.2, Dmitry Gutov, 2014/07/26
- [elpa] 16/16: Merge commit 'b1d019a4c815ac8bdc240d69eaa74eb4e34640e8' from company-master, Dmitry Gutov, 2014/07/26
- [elpa] 04/16: company-pseudo-tooltip-guard: Invalidate after crossing line continuation, Dmitry Gutov, 2014/07/26