;ELC
|
;;; Compiled
|
;;; in Emacs version 26.1
|
;;; with all optimizations.
|
|
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
|
|
;;; This file does not contain utf-8 non-ASCII characters,
|
;;; and so can be loaded in Emacs versions earlier than 23.
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
(byte-code "\300\301!\210\300\302!\207" [require company cl-lib] 2)
|
(defvar company-tng--overlay nil nil)
|
(make-variable-buffer-local 'company-tng--overlay)
|
#@230 When the user changes the selection at least once, this
|
frontend will display the candidate in the buffer as if it's
|
already there and any key outside of `company-active-map' will
|
confirm the selection and finish the completion.
|
(defalias 'company-tng-frontend #[(command) "\306\267\202{ \307``\"\211\310 \311\312#\210)\313\314\315\316#\210\313\317\320\321#\207\n\f8 G !\322 ` Z`#\210\310 \323U\203A \324\202B \325\"\205I !#+\207\n\203X \326\n!\210\327\302!\210\330\314\316\"\210\330\317\321\"\207\"\205z \331\332 !?\205| \333 \210\334#\313\335\315\336#\207\337\207" [command ov company-tng--overlay company-selection company-candidates company-prefix #s(hash-table size 4 test eql rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (show 6 update 32 hide 76 pre-command 98)) make-overlay overlay-put priority 2 advice-add company-select-next :before-until company-tng--allow-unselected company-fill-propertize :filter-args company-tng--adjust-tooltip-highlight move-overlay 0 after-string display delete-overlay kill-local-variable advice-remove company--company-command-p this-command-keys company--unread-this-command-keys company-complete-selection company-call-backend company-tng--supress-post-completion nil prefix selected company-selection-changed this-command] 5 (#$ . 566)])
|
#@58 Applies the default configuration to enable company-tng.
|
(defalias 'company-tng-configure-default #[nil "\304\305\n\306\307\304#\210\306\310\304#\210\306\311\312#\210\306\313\312#\210\306\314\315#\210\306\316\315#)\207" [company-require-match company-frontends company-active-map keymap nil (company-tng-frontend company-pseudo-tooltip-frontend company-echo-metadata-frontend) define-key [return] " " [tab] company-select-next " " [backtab] company-select-previous [33554441]] 4 (#$ . 1877)])
|
#@679 Advice `company-select-next' to allow for an 'unselected'
|
state. Unselected means that no user interaction took place on the
|
completion candidates and it's marked by setting
|
`company-selection-changed' to nil. This advice will call the underlying
|
`company-select-next' unless we need to transition to or from an unselected
|
state.
|
|
Possible state transitions:
|
- (arg > 0) unselected -> first candidate selected
|
- (arg < 0) first candidate selected -> unselected
|
- (arg < 0 wrap-round) unselected -> last candidate selected
|
- (arg < 0 no wrap-round) unselected -> unselected
|
|
There is no need to advice `company-select-previous' because it calls
|
`company-select-next' internally.
|
(defalias 'company-tng--allow-unselected #[(&optional arg) "\203\n \303V\203 ?\2058 \304\206 \305S\306\"\210\307\207\303W\2058 \2058 \n\\\303W\2058 \304\303!\210\310\311\312!\210\307\207" [arg company-selection-changed company-selection 0 company-set-selection 1 force-update t nil company-call-frontends update] 3 (#$ . 2386)])
|
#@133 Prevent the tooltip from highlighting the current selection if it wasn't
|
made explicitly (i.e. `company-selection-changed' is true)
|
(defalias 'company-tng--adjust-tooltip-highlight #[(args) "\204 \303 \233\211\304\240\210) \207" [company-selection-changed args #1=#:c 3 nil] 3 (#$ . 3410)])
|
#@344 Installed as a :before-until advice on `company-call-backend' and
|
prevents the 'post-completion command from being delivered to the backend
|
for the next iteration. post-completion do things like expand snippets
|
which are undesirable because completions are implicit in company-tng and
|
visible side-effects after the completion are surprising.
|
(defalias 'company-tng--supress-post-completion #[(command &rest args) "\301=\205\f \302\303\304\"\210\305\207" [command post-completion advice-remove company-call-backend company-tng--supress-post-completion t] 3 (#$ . 3711)])
|
(provide 'company-tng)
|