[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b20726c 026/173: string-prefix-p signals error on nil in E
From: |
Dmitry Gutov |
Subject: |
[elpa] master b20726c 026/173: string-prefix-p signals error on nil in Emacs < 25 |
Date: |
Thu, 23 Jun 2016 00:28:35 +0000 (UTC) |
branch: master
commit b20726c7b64dafdd10bd3ba44750e9acaad12b6f
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
string-prefix-p signals error on nil in Emacs < 25
Fixes #332
---
company-clang.el | 2 +-
test/clang-tests.el | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/company-clang.el b/company-clang.el
index 79bd5bd..cc392e4 100644
--- a/company-clang.el
+++ b/company-clang.el
@@ -145,7 +145,7 @@ or automatically through a custom
`company-clang-prefix-guesser'."
(defun company-clang--annotation (candidate)
(let ((ann (company-clang--annotation-1 candidate)))
- (if (not (string-prefix-p "(*)" ann))
+ (if (not (and ann (string-prefix-p "(*)" ann)))
ann
(with-temp-buffer
(insert ann)
diff --git a/test/clang-tests.el b/test/clang-tests.el
index f2d55cc..abe690b 100644
--- a/test/clang-tests.el
+++ b/test/clang-tests.el
@@ -48,3 +48,7 @@
(ert-deftest company-clang-func-ptr-annotation ()
(let ((str (propertize "foo" 'meta "void (*)(int) foo")))
(should (equal (company-clang 'annotation str) "(*)(int)"))))
+
+(ert-deftest company-clang-null-annotation ()
+ (let ((str "char"))
+ (should (null (company-clang 'annotation str)))))
- [elpa] master 733d4a9 019/173: Merge pull request #318 from iqbalansari/master, (continued)
- [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, 2016/06/22
- [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 <=
- [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
- [elpa] master 8202638 041/173: Document ignore-case backend command, Dmitry Gutov, 2016/06/22
- [elpa] master d463642 062/173: company-etags-find-table: fix fallback tags file expansion, Dmitry Gutov, 2016/06/22
- [elpa] master 5f8e6eb 066/173: Merge pull request #397 from bremner/make-elpa-fix, Dmitry Gutov, 2016/06/22