[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 23/31: Define company-version
From: |
Dmitry Gutov |
Subject: |
[elpa] 23/31: Define company-version |
Date: |
Tue, 18 Mar 2014 05:19:38 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit 641657ff12ed986d4896a2ff5ef7bd586d95bd73
Author: Dmitry Gutov <address@hidden>
Date: Fri Mar 14 02:30:42 2014 +0200
Define company-version
Closes #77
---
NEWS.md | 1 +
company.el | 12 ++++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index 7403af4..3b4ae78 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
## Next
+* New function `company-version`.
* New bundled back-end `company-yasnippet`.
* Completion candidates returned from grouped back-ends are tagged to remember
which back-end each came from.
diff --git a/company.el b/company.el
index 6367cba..da2e940 100644
--- a/company.el
+++ b/company.el
@@ -1820,6 +1820,18 @@ Example: \(company-begin-with '\(\"foo\" \"foobar\"
\"foobarbaz\"\)\)"
,require-match)))
callback))
+(defun company-version (&optional show-version)
+ "Get the Company version as string.
+
+If SHOW-VERSION is non-nil, show the version in the echo area."
+ (interactive (list t))
+ (with-temp-buffer
+ (insert-file-contents (find-library-name "company"))
+ (require 'lisp-mnt)
+ (if show-version
+ (message "Company version: %s" (lm-version))
+ (lm-version))))
+
;;; pseudo-tooltip
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar company-pseudo-tooltip-overlay nil)
- [elpa] 12/31: Fix `args-out-of-bounds' error on formatting annotations when annotation start position is greater than the width of window., (continued)
- [elpa] 12/31: Fix `args-out-of-bounds' error on formatting annotations when annotation start position is greater than the width of window., Dmitry Gutov, 2014/03/18
- [elpa] 05/31: Add user option company-tooltip-align-annotations, Dmitry Gutov, 2014/03/18
- [elpa] 15/31: Clear company-backend in company-auto-begin, Dmitry Gutov, 2014/03/18
- [elpa] 19/31: Highlight last annotation character, too, Dmitry Gutov, 2014/03/18
- [elpa] 13/31: Merge pull request #70 from sadboy/master, Dmitry Gutov, 2014/03/18
- [elpa] 18/31: company--multi-backend-adapter: noop when arg is empty, Dmitry Gutov, 2014/03/18
- [elpa] 16/31: Tag candidates from grouped backends, Dmitry Gutov, 2014/03/18
- [elpa] 17/31: Add company-yasnippet, Dmitry Gutov, 2014/03/18
- [elpa] 22/31: company-sort-by-occurrence: do stable sorting, Dmitry Gutov, 2014/03/18
- [elpa] 20/31: Fix company-yasnippet summary, Dmitry Gutov, 2014/03/18
- [elpa] 23/31: Define company-version,
Dmitry Gutov <=
- [elpa] 24/31: company-yasnippet: autoload, to make it easy to use separately, Dmitry Gutov, 2014/03/18
- [elpa] 27/31: company-semantic--current-tags: make buffer-local, Dmitry Gutov, 2014/03/18
- [elpa] 25/31: company-keywords-alist: add missing question mark, Dmitry Gutov, 2014/03/18
- [elpa] 29/31: Remove leftover debug statement, Dmitry Gutov, 2014/03/18
- [elpa] 28/31: company-semantic: don't try to fetch doc for tag without buffer, Dmitry Gutov, 2014/03/18
- [elpa] 08/31: Wrap `company-call-backend' in `condition-case', Dmitry Gutov, 2014/03/18
- [elpa] 26/31: Support the keyword :with, Dmitry Gutov, 2014/03/18
- [elpa] 30/31: Release 0.7.1, Dmitry Gutov, 2014/03/18
- [elpa] 31/31: Merge commit '7be4321260f0c73ef4c3cadc646f6bb496650253' from company, Dmitry Gutov, 2014/03/18
- [elpa] 21/31: company-init-backend: don't try to initialize lambdas, Dmitry Gutov, 2014/03/18