;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310DD\311\312\313\314\303&\210\304\315\306\307\316DD\317\312\313\314\303&\207" [require cl-lib tern auto-complete custom-declare-variable tern-ac-on-dot funcall function #[0 "\300\207" [t] 1] "[AC] If t, tern enable completion by auto-completion." :type boolean :group tern-ac-sync #[0 "\300\207" [t] 1] "[AC] If t, auto-complete will wait for tern canditates before starting.\nThis enables tern canditates to integrate automatically in auto-complete without\nthe need for a separate keybinding.\n\nRemember to add ac-source-tern-completion to ac-sources."] 8) #@36 [internal] tern-ac-complete-reply. (defvar tern-ac-complete-reply nil (#$ . 718)) #@66 [internal] The point where `tern-ac-complete-request' is called. (defvar tern-ac-complete-request-point 0 (#$ . 806)) #@11 (fn CC) (defalias 'tern-ac-complete-request #[257 "`\303`\304\305\306\"\307`#\207" [tern-last-point-pos tern-ac-complete-reply tern-ac-complete-request-point nil tern-run-query make-closure #[257 "\301!\210\300 \207" [V0 tern-ac-complete-response] 3 "\n\n(fn DATA)"] ((type . "completions") (types . t) (docs . t) (caseInsensitive . t))] 5 (#$ . 930)]) #@13 (fn DATA) (defalias 'tern-ac-complete-response #[257 "\302\236A\303\304\211T\211\262\203#GW\203#H\262B\262\202\211\237\266\204\305\236AT\306\236AT\307\"F\211\207" [tern-last-completions tern-ac-complete-reply completions -1 nil start end buffer-substring-no-properties] 8 (#$ . 1296)]) #@33 Complete code at point by tern. (defalias 'tern-ac-complete #[0 "\300\301!\207" [tern-ac-complete-request #[0 "\301B\302 )\207" [ac-sources ac-source-tern-completion ac-start] 2]] 2 (#$ . 1615) nil]) #@48 Insert dot and complete code at point by tern. (defalias 'tern-ac-dot-complete #[0 "\300c\210\301\302 8?\205 \303 \207" ["." 4 syntax-ppss tern-ac-complete] 2 (#$ . 1823) nil]) #@42 [AC] truncation length for type summary. (defvar tern-ac-completion-truncate-length 22 (#$ . 2007)) (defalias 'tern-ac-completion-matches #[0 "\301\302\"\207" [tern-ac-complete-reply mapcar #[257 "\301\236A\302\236A\303\236A\304\305\204\306\202$\307\310\"\203#\311\202$\312\313\314\206,\306\315\316\317%\320\321 Q&\207" [tern-ac-completion-truncate-length doc type name popup-make-item :symbol "?" string-match "fn" "f" "v" :summary truncate-string-to-width 0 nil "..." :document "\n\n"] 15 "\n\n(fn ITEM)"]] 3]) (defalias 'tern-ac-completion-prefix #[0 "\301 \206\f`U\205\f\207" [tern-ac-complete-request-point ac-prefix-default] 2]) (byte-code "\301\302\207" [ac-source-tern-completion ((candidates . tern-ac-completion-matches) (prefix . tern-ac-completion-prefix) (requires . -1)) nil] 1) (defalias 'ac-complete-tern-completion #[0 "\300\301!\207" [auto-complete (ac-source-tern-completion)] 2 nil nil]) #@36 Setup auto-complete for tern-mode. (defalias 'tern-ac-setup #[0 "\203\n\302 \303\304#\207\302 \303\305#\207" [tern-ac-on-dot tern-mode-keymap define-key "." tern-ac-dot-complete nil] 4 (#$ . 2947) nil]) (defvar tern-ac-js-major-modes '(rjsx-mode js2-mode js2-jsx-mode js-mode js-jsx-mode javascript-mode)) (byte-code "\300\301\302\303\304$\210\305\301\306\"\210\307\310!\207" [ad-add-advice auto-complete (add-tern-ac-candidates nil t (advice lambda nil "Load tern-js canditates before ac-start." (if (and tern-ac-sync (memq major-mode tern-ac-js-major-modes) (not (or (ac-menu-live-p) (ac-inline-live-p)))) (tern-ac-complete-request 'auto-complete-1) ad-do-it))) around first ad-activate nil provide tern-auto-complete] 5)