X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/3dc7169f617fbaeac115e8089e470fc115ae444f..41ef088456675919e4b56a41f964d50a81a781dc:/packages/company/company-yasnippet.el diff --git a/packages/company/company-yasnippet.el b/packages/company/company-yasnippet.el index ae370c78f..741a16008 100644 --- a/packages/company/company-yasnippet.el +++ b/packages/company/company-yasnippet.el @@ -25,6 +25,7 @@ ;;; Code: +(require 'cl-lib) (require 'yasnippet) (defun company-yasnippet--candidates (prefix) @@ -74,14 +75,17 @@ shadow back-ends that come after it. Recommended usages: (global-set-key (kbd \"C-c y\") 'company-yasnippet) " (interactive (list 'interactive)) - (case command + (cl-case command (interactive (company-begin-backend 'company-yasnippet)) (prefix ;; Should probably use `yas--current-key', but that's bound to be slower. ;; How many trigger keys start with non-symbol characters anyway? (and yas-minor-mode (company-grab-symbol))) - (annotation (concat " -> " (get-text-property 0 'yas-annotation arg))) + (annotation + (concat + (unless company-tooltip-align-annotations " -> ") + (get-text-property 0 'yas-annotation arg))) (candidates (company-yasnippet--candidates arg)) (post-completion (let ((template (get-text-property 0 'yas-template arg)))