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

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

[elpa] master 287a5fb 18/66: Make example backend interactive


From: Dmitry Gutov
Subject: [elpa] master 287a5fb 18/66: Make example backend interactive
Date: Mon, 5 Nov 2018 18:19:15 -0500 (EST)

branch: master
commit 287a5fb7bcd0644caadfc6e7f23bd8aee0830718
Author: Wilfred Hughes <address@hidden>
Commit: Wilfred Hughes <address@hidden>

    Make example backend interactive
    
    When writing your first company backend, it's really helpful to be able to 
run
    the example backend with M-x. Many real company backends are interactive 
too.
---
 company.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/company.el b/company.el
index 1721005..d129633 100644
--- a/company.el
+++ b/company.el
@@ -44,7 +44,9 @@
 ;; Here is a simple example completing "foo":
 ;;
 ;; (defun company-my-backend (command &optional arg &rest ignored)
+;;   (interactive (list 'interactive))
 ;;   (pcase command
+;;     (`interactive (company-begin-backend 'company-my-backend))
 ;;     (`prefix (company-grab-symbol))
 ;;     (`candidates (list "foobar" "foobaz" "foobarbaz"))
 ;;     (`meta (format "This value is named %s" arg))))



reply via email to

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