[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 027d180 22/40: company--perform: Clarify the control flow
From: |
Dmitry Gutov |
Subject: |
[elpa] master 027d180 22/40: company--perform: Clarify the control flow a little bit |
Date: |
Thu, 2 Jan 2020 18:57:03 -0500 (EST) |
branch: master
commit 027d180ae48ea11a0a60293f69b9ab96614e4435
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
company--perform: Clarify the control flow a little bit
Inspired by #901
---
company.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/company.el b/company.el
index 6feb6fc..e6c8c7e 100644
--- a/company.el
+++ b/company.el
@@ -1619,8 +1619,11 @@ prefix match (same case) will be prioritized."
(cl-return c)))))
(defun company--perform ()
- (or (and company-candidates (company--continue))
- (and (company--should-complete) (company--begin-new)))
+ (cond
+ (company-candidates
+ (company--continue))
+ ((company--should-complete)
+ (company--begin-new)))
(if (not company-candidates)
(setq company-backend nil)
(setq company-point (point)
@@ -2724,6 +2727,7 @@ If SHOW-VERSION is non-nil, show the version in the echo
area."
(let ((str (concat (when nl " \n")
(mapconcat 'identity (nreverse new) "\n")
"\n")))
+ ;; Use add-face-text-property in Emacs 24.4
(font-lock-append-text-property 0 (length str) 'face 'default str)
(when nl (put-text-property 0 1 'cursor t str))
str)))
- [elpa] master 1cb2960 11/40: Use line-wrap in company doc buffer, (continued)
- [elpa] master 1cb2960 11/40: Use line-wrap in company doc buffer, Dmitry Gutov, 2020/01/02
- [elpa] master f6974e3 07/40: Merge pull request #909 from company-mode/revert-904-master, Dmitry Gutov, 2020/01/02
- [elpa] master ec1fb85 16/40: Fix typos, Dmitry Gutov, 2020/01/02
- [elpa] master 39a74c5 18/40: Add a NEWS entry, Dmitry Gutov, 2020/01/02
- [elpa] master c45c5f9 08/40: Extract company-capf--candidates for ease of debugging, Dmitry Gutov, 2020/01/02
- [elpa] master ccc22eb 05/40: Merge pull request #904 from redguardtoo/master, Dmitry Gutov, 2020/01/02
- [elpa] master 263438e 12/40: Merge pull request #930 from Zetagon/master, Dmitry Gutov, 2020/01/02
- [elpa] master 3cd2b1a 13/40: Update copyright, Dmitry Gutov, 2020/01/02
- [elpa] master d943198 15/40: Add some clarification for the require-match 'never return value, Dmitry Gutov, 2020/01/02
- [elpa] master 67b6041 17/40: Merge pull request #934 from DamienCassou/typos, Dmitry Gutov, 2020/01/02
- [elpa] master 027d180 22/40: company--perform: Clarify the control flow a little bit,
Dmitry Gutov <=
- [elpa] master 7287fa7 28/40: company-show-numbers-function: Improve the docstring, Dmitry Gutov, 2020/01/02
- [elpa] master 14f80ed 27/40: Move face definitions to a separate group, Dmitry Gutov, 2020/01/02
- [elpa] master 74b75eb 31/40: company-gtags--fetch-tags: Allow exit status 1, Dmitry Gutov, 2020/01/02
- [elpa] master 87c35d8 26/40: End group name with period, Dmitry Gutov, 2020/01/02
- [elpa] master a8d5d6f 24/40: company-files: Recognize file names right after [, Dmitry Gutov, 2020/01/02
- [elpa] master cf2d50b 25/40: Change the overlay's "underlying face" in a better way, Dmitry Gutov, 2020/01/02
- [elpa] master 335eb42 30/40: Fix case when "underlying face" is from Flymake or Flycheck, Dmitry Gutov, 2020/01/02
- [elpa] master d5f3a95 29/40: add option to show number on the left, Dmitry Gutov, 2020/01/02
- [elpa] master 856c66a 32/40: company-gtags--annotation: Use regexp-quote, Dmitry Gutov, 2020/01/02
- [elpa] master c046847 33/40: Add a NEWS entry, Dmitry Gutov, 2020/01/02