[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master ae9dd22 32/66: Make fixes after Dmitry's comments
From: |
Dmitry Gutov |
Subject: |
[elpa] master ae9dd22 32/66: Make fixes after Dmitry's comments |
Date: |
Mon, 5 Nov 2018 18:19:17 -0500 (EST) |
branch: master
commit ae9dd22452f75522bbcd778143b4baf8853875ce
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Make fixes after Dmitry's comments
* company-capf.el (company-capf): Capitalize and punctuate comment.
(company-capf): Only care about 'face text property.
* test/capf-tests.el: Fix copyright years. Fix top-level comment.
---
company-capf.el | 11 +++++------
test/capf-tests.el | 9 +++++----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/company-capf.el b/company-capf.el
index 52716a3..7e76dfc 100644
--- a/company-capf.el
+++ b/company-capf.el
@@ -88,8 +88,8 @@
(let* ((table (nth 3 res))
(pred (plist-get (nthcdr 4 res) :predicate))
(meta (completion-metadata
- (buffer-substring (nth 1 res) (nth 2 res))
- table pred))
+ (buffer-substring (nth 1 res) (nth 2 res))
+ table pred))
(sortfun (cdr (assq 'display-sort-function meta)))
(candidates (completion-all-completions arg table pred (length
arg)))
(last (last candidates))
@@ -112,8 +112,8 @@
(nth 3 res) (plist-get (nthcdr 4 res) :predicate))))
(cdr (assq 'display-sort-function meta))))))
(`match
- ;; ask the for the `:company-match' function. If that doesn't help,
- ;; fallback to sniffing for face changes to get a suitable value
+ ;; Ask the for the `:company-match' function. If that doesn't help,
+ ;; fallback to sniffing for face changes to get a suitable value.
(let ((f (plist-get (nthcdr 4 (company--capf-data)) :company-match)))
(if f (funcall f arg)
(let* ((match-start nil) (pos -1)
@@ -123,8 +123,7 @@
(while (< pos limit)
(setq pos
(if (< pos 0) 0 (next-property-change pos arg limit)))
- (setq prop-value (or (get-text-property pos 'face arg)
- (get-text-property pos 'font-lock-face arg))
+ (setq prop-value (get-text-property pos 'font-lock-face arg)
faces (if (listp prop-value) prop-value (list prop-value))
has-face-p (memq 'completions-common-part faces))
(cond ((and (not match-start) has-face-p)
diff --git a/test/capf-tests.el b/test/capf-tests.el
index 29965b2..b70131c 100644
--- a/test/capf-tests.el
+++ b/test/capf-tests.el
@@ -1,6 +1,6 @@
;;; capf-tests.el --- company tests for the company-capf backend -*-
lexical-binding: t; -*-
-;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2018 Free Software Foundation, Inc.
;; Author: João Távora <address@hidden>
;; Keywords:
@@ -55,9 +55,10 @@
(should company-candidates)
(should (member "with-current-buffer" company-candidates))))
-;; Re. "perfect" highliting of the non-prefix in company-capf matches, it is
-;; only working in recent Emacsen containing this commit. The two following
-;; tests reflect that.
+;; Re. "perfect" highlighting of the non-prefix in company-capf matches, it is
+;; only working-out-of-the box (i.e. without the `:company-match' meta) in
+;; recent Emacsen containing the following commit. The two tests that follow
+;; reflect that.
;;
;; commit 325ef57b0e3977f9509f1049c826999e8b7c226d
;; Author: Stefan Monnier <address@hidden>
- [elpa] master 1c76850 50/66: Reformat, (continued)
- [elpa] master 1c76850 50/66: Reformat, Dmitry Gutov, 2018/11/05
- [elpa] master ddfdcb7 20/66: Abort when completion-at-point is invoked, Dmitry Gutov, 2018/11/05
- [elpa] master 5015aad 41/66: Switch to npostavs/emacs-travis binaries, Dmitry Gutov, 2018/11/05
- [elpa] master 1c28831 51/66: add some golang's builtin funcitons to go-mode, Dmitry Gutov, 2018/11/05
- [elpa] master c984355 52/66: resort the go-mode in company-keywords.el, Dmitry Gutov, 2018/11/05
- [elpa] master 4205ad6 61/66: Merge pull request #830 from jabranham/alias, Dmitry Gutov, 2018/11/05
- [elpa] master 63fdb96 40/66: add some golang fake keywords for a better programming experience, Dmitry Gutov, 2018/11/05
- [elpa] master 9e8bd0b 42/66: Merge pull request #821 from iquiw/emacs-travis-bin, Dmitry Gutov, 2018/11/05
- [elpa] master 779662f 24/66: Truncate the Clang error in the echo area, Dmitry Gutov, 2018/11/05
- [elpa] master a913803 27/66: company-diag: Catch any error in `completions', Dmitry Gutov, 2018/11/05
- [elpa] master ae9dd22 32/66: Make fixes after Dmitry's comments,
Dmitry Gutov <=
- [elpa] master e14cd4f 46/66: add some comments for adding go-mode's fake keywords, Dmitry Gutov, 2018/11/05
- [elpa] master 2d87b1f 44/66: fix golang's keywords sort, Dmitry Gutov, 2018/11/05
- [elpa] master d2db92b 53/66: Update company-keywords.el, Dmitry Gutov, 2018/11/05
- [elpa] master 045b23a 38/66: move golang's keywords to the right place, Dmitry Gutov, 2018/11/05
- [elpa] master 382764a 34/66: Merge pull request #798 from joaotavora/master, Dmitry Gutov, 2018/11/05
- [elpa] master 87f479b 59/66: Merge pull request #829 from chunzhouyu/master, Dmitry Gutov, 2018/11/05
- [elpa] master 7c6357a 60/66: Define variable alias before referent, Dmitry Gutov, 2018/11/05
- [elpa] master 88b8282 58/66: add nil and bool to company-keywords for go-mode, Dmitry Gutov, 2018/11/05
- [elpa] master 4fe0bec 57/66: Merge pull request #828 from chunzhouyu/master, Dmitry Gutov, 2018/11/05
- [elpa] master 4fa5a37 63/66: Backends are called at the same point where company begins, Dmitry Gutov, 2018/11/05