branch: externals/company commit ba3e54b760fd865f7a91f6e030149d3d99f893a7 Author: Y. E <yugen...@gmail.com> Commit: Y. E <yugen...@gmail.com>
Improve readability by minor refactoring Initially suggested in #1103 --- company.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/company.el b/company.el index 2dcfd8d..13aaea7 100644 --- a/company.el +++ b/company.el @@ -3180,11 +3180,13 @@ If SHOW-VERSION is non-nil, show the version in the echo area." (right (company-space-string company-tooltip-margin)) (width width)) (when company-show-numbers + (let ((numbers-place + (gv-ref (if (eq company-show-numbers 'left) left right)))) (cl-decf width 2) (cl-incf numbered) - (setf (if (eq company-show-numbers 'left) left right) + (setf (gv-deref numbers-place) (concat (funcall company-show-numbers-function numbered) - (if (eq company-show-numbers 'left) left right)))) + (gv-deref numbers-place))))) (push (concat (company-fill-propertize str annotation width (equal i selection)