[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c08dbc1 039/173: Don't use `sit-for'
From: |
Dmitry Gutov |
Subject: |
[elpa] master c08dbc1 039/173: Don't use `sit-for' |
Date: |
Thu, 23 Jun 2016 00:28:36 +0000 (UTC) |
branch: master
commit c08dbc18f76de7275368780e564947453cb7bce6
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Don't use `sit-for'
Fixes #353 (global-hl-line-mode flickering).
---
company.el | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/company.el b/company.el
index 9163749..ec42103 100644
--- a/company.el
+++ b/company.el
@@ -1508,6 +1508,7 @@ from the rest of the back-ends in the group, if any, will
be left at the end."
company-point nil)
(when company-timer
(cancel-timer company-timer))
+ (company-echo-cancel t)
(company-search-mode 0)
(company-call-frontends 'hide)
(company-enable-overriding-keymap nil))
@@ -1538,6 +1539,7 @@ from the rest of the back-ends in the group, if any, will
be left at the end."
(when company-timer
(cancel-timer company-timer)
(setq company-timer nil))
+ (company-echo-cancel t)
(company-uninstall-map))
(defun company-post-command ()
@@ -2751,13 +2753,19 @@ Returns a negative number if the tooltip should be
displayed above point."
(message ""))))
(defun company-echo-show-soon (&optional getter)
+ (company-echo-cancel)
+ (setq company-echo-timer (run-with-timer 0 nil 'company-echo-show getter)))
+
+(defun company-echo-cancel (&optional unset)
(when company-echo-timer
(cancel-timer company-echo-timer))
- (setq company-echo-timer (run-with-timer 0 nil 'company-echo-show getter)))
+ (when unset
+ (setq company-echo-timer nil)))
-(defsubst company-echo-show-when-idle (&optional getter)
- (when (sit-for company-echo-delay)
- (company-echo-show getter)))
+(defun company-echo-show-when-idle (&optional getter)
+ (company-echo-cancel)
+ (setq company-echo-timer
+ (run-with-idle-timer company-echo-delay nil 'company-echo-show
getter)))
(defun company-echo-format ()
- [elpa] master 6301093 023/173: Clarify the meaning of cdr in the prefix cons, (continued)
- [elpa] master 6301093 023/173: Clarify the meaning of cdr in the prefix cons, Dmitry Gutov, 2016/06/22
- [elpa] master 9f67f1e 027/173: Fix docstring, Dmitry Gutov, 2016/06/22
- [elpa] master 17e6d19 016/173: Remove company-pysmell, Dmitry Gutov, 2016/06/22
- [elpa] master 733d4a9 019/173: Merge pull request #318 from iqbalansari/master, Dmitry Gutov, 2016/06/22
- [elpa] master 7ad049d 031/173: Fix the svg url, Dmitry Gutov, 2016/06/22
- [elpa] master 5296784 038/173: company-template: Add a summary line, Dmitry Gutov, 2016/06/22
- [elpa] master 5fc4a9a 034/173: Update company-clang-objc-templatify in line with the previous change, Dmitry Gutov, 2016/06/22
- [elpa] master abe46da 037/173: company-files: Skip disconnected remote completions for "/xyz", Dmitry Gutov, 2016/06/22
- [elpa] master 1f1925f 005/173: company-backends: Make the version check more conservative, Dmitry Gutov, 2016/06/22
- [elpa] master 9486563 035/173: Accept markers in the data returned by c-a-p-f functions, Dmitry Gutov, 2016/06/22
- [elpa] master c08dbc1 039/173: Don't use `sit-for',
Dmitry Gutov <=
- [elpa] master 1dce769 036/173: company-version: Require find-func, Dmitry Gutov, 2016/06/22
- [elpa] master 5b736e9 024/173: Introduce company-dabbrev-ignore-invisible, Dmitry Gutov, 2016/06/22
- [elpa] master b20726c 026/173: string-prefix-p signals error on nil in Emacs < 25, Dmitry Gutov, 2016/06/22
- [elpa] master 27c913a 040/173: Don't use `require-match t' in normal backends, Dmitry Gutov, 2016/06/22
- [elpa] master 4ba4264 047/173: company--begin-new: Reorder statements, Dmitry Gutov, 2016/06/22
- [elpa] master 9c8364d 049/173: company-keywords: Support scala-mode, Dmitry Gutov, 2016/06/22
- [elpa] master d2ff1dc 046/173: company--begin-new: Call `company-cancel' in the unique case, Dmitry Gutov, 2016/06/22
- [elpa] master a053848 050/173: Sort alphabetically, to appease a test, Dmitry Gutov, 2016/06/22
- [elpa] master 25cf452 060/173: Don't start automatically during macro recording, Dmitry Gutov, 2016/06/22
- [elpa] master 7419d5f 058/173: Update the tests, Dmitry Gutov, 2016/06/22