emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 5565541 126/173: Option to have tempo expand tags after co


From: Dmitry Gutov
Subject: [elpa] master 5565541 126/173: Option to have tempo expand tags after completion.
Date: Thu, 23 Jun 2016 00:28:44 +0000 (UTC)

branch: master
commit 5565541255db68894a8dc1269c4ee6cec3287d8d
Author: Rafael Sanchez <address@hidden>
Commit: Rafael Sanchez <address@hidden>

    Option to have tempo expand tags after completion.
---
 company-tempo.el |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/company-tempo.el b/company-tempo.el
index 0fa5c75..aa3a979 100644
--- a/company-tempo.el
+++ b/company-tempo.el
@@ -29,6 +29,15 @@
 (require 'cl-lib)
 (require 'tempo)
 
+(defgroup company-tempo nil
+  "Tempo completion backend."
+  :group 'company)
+
+(defcustom company-tempo-expand nil
+  "Whether to expand a tempo tag after completion."
+  :type '(choice (const :tag "Off" nil)
+                 (const :tag "On" t)))
+
 (defsubst company-tempo-lookup (match)
   (cdr (assoc match (tempo-build-collection))))
 
@@ -56,6 +65,7 @@
     (prefix (or (car (tempo-find-match-string tempo-match-finder)) ""))
     (candidates (all-completions arg (tempo-build-collection)))
     (meta (company-tempo-meta arg))
+    (post-completion (when company-tempo-expand (tempo-expand-if-complete)))
     (sorted t)))
 
 (provide 'company-tempo)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]