emacs.d

My emacs configuration, done in a literate programming fashion using org-mode

git clone git://git.shimmy1996.com/emacs.d.git
commit d913afdf29134c54b2f6fc62ea35455bac834f31
parent e632f811a99e920f824c02e570a19fb366fe4d00
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Thu, 21 Jun 2018 18:15:59 -0500

Add company-yasnippet to all backends.

Diffstat:
MREADME.org | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/README.org b/README.org
@@ -551,7 +551,14 @@ Adding backends is handled by =company-auctex-init=.
 **** =company-yasnippet=
 Add =company-yasnippet= backend for =yasnippet= key completion.
 #+BEGIN_SRC emacs-lisp
-  (push '(company-semantic :with company-yasnippet) company-backends)
+  (defun user/enable-yas-for-backend (backend)
+    "Add yasnippet support for specified BACKEND."
+    (if (and (listp backend) (member 'company-yasnippet backend))
+        backend
+      (append (if (consp backend) backend (list backend))
+              '(:with company-yasnippet))))
+  ;; Enable for all backends.
+  (setq company-backends (mapcar #'user/enable-yas-for-backend company-backends))
 #+END_SRC
 
 ** Flycheck