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

Chizi123
2018-11-18 21067e7cbe6d7a0f65ff5c317a96b5c337b0b3d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
;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!\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)
#@39 Major modes which clang may complete.
(defvar company-clang-modes '(c-mode c++-mode objc-mode) (#$ . 1780))
(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)
(defvar company-clang--prefix nil)
#@13 
 
(fn FILE)
(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)])
(put 'company-clang--guess-pch-file 'byte-optimizer 'byte-compile-inline-expand)
#@21 
 
(fn FILE BEG END)
(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)])
(put 'company-clang--file-substring 'byte-optimizer 'byte-compile-inline-expand)
#@54 Try to guess the prefix file for the current buffer.
(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)])
#@89 Use PREFIX as a prefix (-include ...) file for clang completion.
 
(fn &optional PREFIX)
(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)])
(add-hook 'kill-emacs-hook 'company-clang-set-prefix)
(defconst company-clang--completion-pattern "^COMPLETION: \\_<\\(%s[a-zA-Z0-9_:]*\\)\\(?: : \\(.*\\)$\\)?$")
(defconst company-clang--error-buffer-name "*clang-error*")
(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])
#@20 
 
(fn PREFIX OBJC)
(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)])
#@18 
 
(fn CANDIDATE)
(defalias 'company-clang--meta #[257 "\300\301\302#\207" [get-text-property 0 meta] 5 (#$ . 5181)])
#@18 
 
(fn CANDIDATE)
(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)])
#@18 
 
(fn CANDIDATE)
(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)])
#@13 
 
(fn TEXT)
(defalias 'company-clang--strip-formatting #[257 "\300\301\302\300\303\304\305$\305$\207" [replace-regexp-in-string "#]" " " "[<{[]#\\|#[>}]" "" t] 9 (#$ . 6381)])
#@17 
 
(fn RES ARGS)
(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)])
#@35 
 
(fn PREFIX CALLBACK &rest ARGS)
(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)])
#@12 
 
(fn POS)
(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)])
(put 'company-clang--build-location 'byte-optimizer 'byte-compile-inline-expand)
#@12 
 
(fn POS)
(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)])
(put 'company-clang--build-complete-args 'byte-optimizer 'byte-compile-inline-expand)
#@24 
 
(fn PREFIX CALLBACK)
(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)])
(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])
(defconst company-clang-required-version 1.1)
(defvar company-clang--version nil)
(defalias 'company-clang--auto-save-p #[0 "\300\301\302\"?\207" [company-clang--check-version 2.9 3.1] 3])
#@22 
 
(fn MIN APPLE-MIN)
(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)])
#@51 Return the version of `company-clang-executable'.
(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)])
(put 'company-clang-version 'byte-optimizer 'byte-compile-inline-expand)
#@552 `company-mode' completion backend for Clang.
Clang is a parser for C and ObjC.  Clang version 1.1 or newer is required.
 
Additional command line arguments can be specified in
`company-clang-arguments'.  Prefix files (-include ...) can be selected
with `company-clang-set-prefix' or automatically through a custom
`company-clang-prefix-guesser'.
 
With Clang versions before 2.9, we have to save the buffer before
performing completion.  With Clang 2.9 and later, buffer contents are
passed via standard input.
 
(fn COMMAND &optional ARG &rest IGNORED)
(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)])
(provide 'company-clang)