mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-19 a4b9172aefa91861b587831e06f55b1e19f3f3be
commit | author | age
5cb5f7 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\301%\210\311\312\313\314\315DD\316\317\320%\210\311\321\313\314\322DD\323\317\324%\210\311\325\313\314\326DD\327\317\330%\210\311\331\313\314\332DD\333\317\334%\207" [require company company-template cl-lib custom-declare-group company-clang nil "Completion backend for Clang." :group custom-declare-variable company-clang-executable funcall function #[0 "\300\301!\207" [executable-find "clang"] 2] "Location of clang executable." :type file company-clang-begin-after-member-access #[0 "\300\207" [t] 1] "When non-nil, automatic completion will start whenever the current\nsymbol is preceded by \".\", \"->\" or \"::\", ignoring\n`company-minimum-prefix-length'.\n\nIf `company-begin-commands' is a list, it should include `c-electric-lt-gt'\nand `c-electric-colon', for automatic completion right after \">\" and\n\":\"." boolean company-clang-arguments #[0 "\300\207" [nil] 1] "Additional arguments to pass to clang when completing.\nPrefix files (-include ...) can be selected with `company-clang-set-prefix'\nor automatically through a custom `company-clang-prefix-guesser'." (repeat (string :tag "Argument")) company-clang-prefix-guesser #[0 "\300\207" [company-clang-guess-prefix] 1] "A function to determine the prefix file for the current buffer." (function :tag "Guesser function" nil)] 6)
16 #@39 Major modes which clang may complete.
17 (defvar company-clang-modes '(c-mode c++-mode objc-mode) (#$ . 1780))
18 (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable company-clang-insert-arguments funcall function #[0 "\300\207" [t] 1] "When non-nil, insert function arguments as a template after completion." :type boolean :package-version (company . "0.8.0")] 8)
19 (defvar company-clang--prefix nil)
20 #@13 
21
22 (fn FILE)
23 (defalias 'company-clang--guess-pch-file #[257 "\300\301!!\302!\303\232\203\301!\262\304\305\306\305$@\207" [directory-file-name file-name-directory file-name-nondirectory "Classes" directory-files t "\\([^.]h\\|[^h]\\).pch\\'"] 7 (#$ . 2215)])
24 (put 'company-clang--guess-pch-file 'byte-optimizer 'byte-compile-inline-expand)
25 #@21 
26
27 (fn FILE BEG END)
28 (defalias 'company-clang--file-substring #[771 "\300\301!r\211q\210\302\303\304\305\306!\307\"\310$\216\311\312$\210\313 *\207" [generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents-literally nil buffer-string] 10 (#$ . 2566)])
29 (put 'company-clang--file-substring 'byte-optimizer 'byte-compile-inline-expand)
30 #@54 Try to guess the prefix file for the current buffer.
31 (defalias 'company-clang-guess-prefix #[0 "\301\302!!\303!\304\232\203\302!\262\305\306\307\306$@\266\202\211\205B\211\310\311\312\313!r\211q\210\314\310\315\316\317!\320\"\321$\216\322\323$\210\324 *\266\204\211\325\235?\205J\207" [buffer-file-name directory-file-name file-name-directory file-name-nondirectory "Classes" directory-files t "\\([^.]h\\|[^h]\\).pch\\'" 0 4 generate-new-buffer " *temp*" make-byte-code "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents-literally nil buffer-string ("CPCH" "gpch")] 11 (#$ . 2994)])
32 #@89 Use PREFIX as a prefix (-include ...) file for clang completion.
33
34 (fn &optional PREFIX)
35 (defalias 'company-clang-set-prefix #[256 "\211;\205\f\301!\205\f\211\211\207" [company-clang--prefix file-regular-p] 3 (#$ . 3643) (byte-code " \211;\204\n    \262\302\303\205\304!\305\205\306!%C\207" [company-clang-prefix-guesser default-directory read-file-name "Prefix file: " file-name-directory t file-name-nondirectory] 8)])
36 (add-hook 'kill-emacs-hook 'company-clang-set-prefix)
37 (defconst company-clang--completion-pattern "^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:]*\\)\\(?: : \\(.*\\)$\\)?$")
38 (defconst company-clang--error-buffer-name "*clang-error*")
39 (defalias 'company-clang--lang-option #[0 "\302=\203\303    !\304\230\203\305\207\306\207\307!\310\311O\207" [major-mode buffer-file-name objc-mode file-name-extension "m" "objective-c" "objective-c++" symbol-name 0 -5] 3])
40 #@20 
41
42 (fn PREFIX OBJC)
43 (defalias 'company-clang--parse-output #[514 "eb\210\302\303!\"\304\211\211\305\304\306#\203`\307\310!\262\211\311\232\204\312 \313\314\315\316\317!\320\"\321$\216\322\323\"\203=\314\211\224O\262)\210\307\324!\211\203W\230\204W\325\314\310\326\327!%\210\210\211B\262\202)\207" [company-clang--completion-pattern case-fold-search format regexp-quote nil re-search-forward t match-string-no-properties 1 "Pattern" match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 string-match ":" 2 put-text-property meta company-clang--strip-formatting] 13 (#$ . 4533)])
44 #@18 
45
46 (fn CANDIDATE)
47 (defalias 'company-clang--meta #[257 "\300\301\302#\207" [get-text-property 0 meta] 5 (#$ . 5181)])
48 #@18 
49
50 (fn CANDIDATE)
51 (defalias 'company-clang--annotation #[257 "\300!\211\203\301\302\"\204\211\202>\303\304!r\211q\210\305\306\307\310\311!\312\"\313$\216c\210\314\315!\210`T\316\317\320\321#\210\211`|\266\322 *\262\207" [company-clang--annotation-1 string-prefix-p "(*)" generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 search-backward ")" re-search-forward ".\\_>" nil t buffer-string] 9 (#$ . 5305)])
52 #@18 
53
54 (fn CANDIDATE)
55 (defalias 'company-clang--annotation-1 #[257 "\300!\211\204 \301\202d\302\303\"\203\211\304\224T\301O\202d\302\305\"\203&\301\202d\302\306\"\205d\307\224SH\310=\204?\311\307\"\202b\312\313!r\211q\210\314\304\315\316\317!\320\"\321$\216c\210b\210\322\323!S\301O*\262\262\207" [company-clang--meta nil string-match "[^:]:[^:]" 0 "(anonymous)" "\\((.*)[ a-z]*\\'\\)" 1 62 match-string generate-new-buffer " *temp*" make-byte-code "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 search-backward "<"] 10 (#$ . 5796)])
56 #@13 
57
58 (fn TEXT)
59 (defalias 'company-clang--strip-formatting #[257 "\300\301\302\300\303\304\305$\305$\207" [replace-regexp-in-string "#]" " " "[<{[]#\\|#[>}]" "" t] 9 (#$ . 6381)])
60 #@17 
61
62 (fn RES ARGS)
63 (defalias 'company-clang--handle-error #[514 "eb\210\306!    \307\310\311\307#Q\312\n\313\"\314\315\316\314#\203%\317e\320\224S\"\202.\321\322#\210\323 rq\210\314\324 \210\325 \312\326\"\327\261\210\211c\210\314eb+\207" [company-clang--error-buffer-name company-clang-executable company-clang--completion-pattern message-truncate-lines inhibit-read-only buffer-read-only get-buffer-create " " mapconcat identity format "" t re-search-forward nil buffer-substring-no-properties 0 message "clang failed with error %d: %s" buffer-string erase-buffer current-time-string "\nclang failed with error %d:\n" "\n\n"] 10 (#$ . 6565)])
64 #@35 
65
66 (fn PREFIX CALLBACK &rest ARGS)
67 (defalias 'company-clang--start-process #[642 "\304\305!\306\307!\310\311!\211\203\312!\210rq\210\313 \210\314)\310\315\316\317 %\320\321\322\323\324\325     %\326\"\327\330%\"\210\331 ?\205T\332ed#\210\333\334\"\210\335!)\262)\207" [process-adaptive-read-buffering buffer-undo-list process-connection-type company-clang-executable derived-mode-p objc-mode get-buffer-create "*clang-output*" nil get-buffer-process kill-process erase-buffer t apply start-file-process "company-clang" set-process-sentinel make-byte-code 514 "\306\307\310\311#)\266\203?\205,\301\312!r\304q\210\211\313=\204$\314\302\"\210\315\300\303\")\262!\207" vconcat vector [inhibit-changing-match-data "hangup\\|killed" nil t string-match process-exit-status 0 company-clang--handle-error company-clang--parse-output] 9 "\n\n(fn PROC STATUS)" company-clang--auto-save-p send-region send-string "\n" process-send-eof] 19 (#$ . 7226)])
68 #@12 
69
70 (fn POS)
71 (defalias 'company-clang--build-location #[257 "\212\211b\210\301\302\303 \203\202\304\305 \306\307 `\310\311$GT$)\207" [buffer-file-name format "%s:%d:%d" company-clang--auto-save-p "-" line-number-at-pos encode-coding-region line-beginning-position utf-8 t] 10 (#$ . 8204)])
72 (put 'company-clang--build-location 'byte-optimizer 'byte-compile-inline-expand)
73 #@12 
74
75 (fn POS)
76 (defalias 'company-clang--build-complete-args #[257 "\303\304\305 ?\205\f\306\307 D    ;\205\310\311    !D\312\313\314\212\211b\210\313\315\305 \203+\n\202,\316\317 \320\321 `\322\323$GT$)\262\"D\305 \203F\n\202G\316C&\207" [company-clang-arguments company-clang--prefix buffer-file-name append ("-fsyntax-only" "-Xclang" "-code-completion-macros") company-clang--auto-save-p "-x" company-clang--lang-option "-include" expand-file-name "-Xclang" format "-code-completion-at=%s" "%s:%d:%d" "-" line-number-at-pos encode-coding-region line-beginning-position utf-8 t] 19 (#$ . 8584)])
77 (put 'company-clang--build-complete-args 'byte-optimizer 'byte-compile-inline-expand)
78 #@24 
79
80 (fn PREFIX CALLBACK)
81 (defalias 'company-clang--candidates #[514 "\304 \203 \305 \203 \306 \210\204\307     \206\310!\210\311\312\313\314\315\"\203)`\202.`GZ\316\317\304 ?\205:\320\321 D\n;\205E\322\323!D\324\325\326\212\211b\210\325\327\304 \203Y \202Z\330\331 \332\333 `\334\335$GT$)\262\"D\304 \203t \202u\330C&\262$\207" [company-clang--prefix company-clang-prefix-guesser company-clang-arguments buffer-file-name company-clang--auto-save-p buffer-modified-p basic-save-buffer company-clang-set-prefix none apply company-clang--start-process company-clang--check-version 4.0 9.0 append ("-fsyntax-only" "-Xclang" "-code-completion-macros") "-x" company-clang--lang-option "-include" expand-file-name "-Xclang" format "-code-completion-at=%s" "%s:%d:%d" "-" line-number-at-pos encode-coding-region line-beginning-position utf-8 t] 25 (#$ . 9276)])
82 (defalias 'company-clang--prefix #[0 "\203    \301\302\303\"\207\304 \207" [company-clang-begin-after-member-access company-grab-symbol-cons "\\.\\|->\\|::" 2 company-grab-symbol] 3])
83 (defconst company-clang-required-version 1.1)
84 (defvar company-clang--version nil)
85 (defalias 'company-clang--auto-save-p #[0 "\300\301\302\"?\207" [company-clang--check-version 2.9 3.1] 3])
86 #@22 
87
88 (fn MIN APPLE-MIN)
89 (defalias 'company-clang--check-version #[514 ":\203+@\211\301\267\202'A\211\211Y\262\262\202*A\211\211Y\262\262\202*\302\303!\207\302\303!\207" [company-clang--version #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (apple 13 normal 26)) error "pcase-exhaustive is not in Emacs 24.3!"] 7 (#$ . 10529)])
90 #@51 Return the version of `company-clang-executable'.
91 (defalias 'company-clang-version #[0 "\301\302!r\211q\210\303\304\305\306\307!\310\"\311$\216\312\313\314\313\315%\210eb\210\316\317\313\314#\203<\320\321!\322\232\2032\323\2023\324\325\320\311!!B\202=\304*\207" [company-clang-executable generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 call-process nil t "--version" re-search-forward "\\(clang\\|Apple LLVM\\) version \\([0-9.]+\\)" match-string-no-properties 1 "Apple LLVM" apple normal string-to-number] 7 (#$ . 10911)])
92 (put 'company-clang-version 'byte-optimizer 'byte-compile-inline-expand)
93 #@552 `company-mode' completion backend for Clang.
94 Clang is a parser for C and ObjC.  Clang version 1.1 or newer is required.
95
96 Additional command line arguments can be specified in
97 `company-clang-arguments'.  Prefix files (-include ...) can be selected
98 with `company-clang-set-prefix' or automatically through a custom
99 `company-clang-prefix-guesser'.
100
101 With Clang versions before 2.9, we have to save the buffer before
102 performing completion.  With Clang 2.9 and later, buffer contents are
103 passed via standard input.
104
105 (fn COMMAND &optional ARG &rest IGNORED)
106 (defalias 'company-clang #[641 "\306\267\202\273\307\310!\207    >\205\274\n\204\311\312!\210\313\314!r\211q\210\315\316\317\320\321!\322\"\323$\216\324\n\325\326\325\327%\210eb\210\330\331\325\326#\203T\332\333!\334\232\203J\335\202K\336\337\332\323!!B\202U\316*\262\340\f\211\"?\205e\311\341\f\"\207    >\205\274 \205\274\n\205\274\342 ?\205\274\343 \206\200\344\207\345\315\346\347\320\321!\350\"\351\352%B\207\353!\207\354!\207\354!1\205\272\211\205\272\211c\210\355\356\"\203\265\357!\202\272\360P!\207\325\207" [major-mode company-clang-modes company-clang-executable company-clang--version company-clang-required-version buffer-file-name #s(hash-table size 7 test eql rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (interactive 6 init 10 prefix 102 candidates 129 meta 145 annotation 149 post-completion 153)) company-begin-backend company-clang error "Company found no clang executable" generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 call-process nil t "--version" re-search-forward "\\(clang\\|Apple LLVM\\) version \\([0-9.]+\\)" match-string-no-properties 1 "Apple LLVM" apple normal string-to-number company-clang--check-version "Company requires clang version %s" company-in-string-or-comment company-clang--prefix stop :async 257 "\301\300\"\207" [company-clang--candidates] 4 "\n\n(fn CB)" company-clang--meta company-clang--annotation string-match "\\`:[^:]" company-template-objc-templatify company-template-c-like-templatify company-clang-insert-arguments] 10 (#$ . 11594) (byte-code "\300C\207" [interactive] 1)])
107 (provide 'company-clang)