;ELC   
;;; Compiled
;;; in Emacs version 25.3.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\303\304\305\306\307\301%\210\310\311\312\313\314\315%\207" [require company cl-lib custom-declare-group company-cmake nil "Completion backend for CMake." :group custom-declare-variable company-cmake-executable (executable-find "cmake") "Location of cmake executable." :type file] 6)
#@114 The arguments we pass to cmake, separately.
They affect which types of symbols we get completion candidates for.
(defvar company-cmake-executable-arguments '("--help-command-list" "--help-module-list" "--help-variable-list") (#$ . 733))
#@33 Regexp to match the candidates.
(defvar company-cmake--completion-pattern "^\\(%s[a-zA-Z0-9_<>]%s\\)$" (#$ . 976))
#@42 Major modes in which cmake may complete.
(defvar company-cmake-modes '(cmake-mode) (#$ . 1097))
#@31 Cache for the raw candidates.
(defvar company-cmake--candidates-cache nil (#$ . 1199))
#@74 Cache for command arguments to retrieve descriptions for the candidates.
(defvar company-cmake--meta-command-cache nil (#$ . 1292))
(defalias 'company-cmake--replace-tags #[(rlt) "\301\302\303\304$\301\305\306\307\310\311##\211\207" [rlt replace-regexp-in-string "\\(.*?\\(IS_GNU\\)?\\)<LANG>\\(.*\\)" #[(_match) "\300\301\302\224\203 \303\202\f \304\305#\207" [mapconcat identity 2 ("\\1CXX\\3" "\\1C\\3" "\\1G77\\3") ("\\1CXX\\3" "\\1C\\3" "\\1Fortran\\3") "\n"] 4] t "\\(.*\\)<CONFIG>\\(.*\\)" mapconcat identity ("\\1DEBUG\\2" "\\1RELEASE\\2" "\\1RELWITHDEBINFO\\2" "\\1MINSIZEREL\\2") "\n"] 7])
#@34 Fill candidates cache if needed.
(defalias 'company-cmake--fill-candidates-cache #[(arg) "\306	\204 \307\310\311\"\312\n	\"?\205> \313\314!rq\210\315\216\316\f\306\317\306\n%\211\320U\2040 \321\322\"\210)\323 +\324!\325\n	#)\207" [rlt company-cmake--candidates-cache arg #1=#:temp-buffer company-cmake-executable res nil make-hash-table :test equal gethash generate-new-buffer " *temp*" #[nil "\301!\205	 \302!\207" [#1# buffer-name kill-buffer] 2] call-process t 0 message "cmake executable exited with error=%d" buffer-string company-cmake--replace-tags puthash] 7 (#$ . 1903)])
(defalias 'company-cmake--parse #[(prefix content cmd) "\306\307\310	!	G\306U\203 \311\202 \312#\313\n\314\"\315\211\315\211\203X @\316\"\203O \317\320\"\211\203N \321\f#\210\fB)A\211\204* *-\207" [company-cmake--completion-pattern prefix content rlt match lines 0 format regexp-quote "+" "*" split-string "\n" nil string-match match-string 1 puthash pattern start line --dolist-tail-- cmd company-cmake--meta-command-cache] 7])
(defalias 'company-cmake--candidates #[(prefix) "\306\211\211\204 \307\310\311\"\f\306\211\203B @\312!\210\313\314\315#\316\"\211\2039 \n\317	#\244A\211\204 *\n+\207" [str cmd-opts results company-cmake--meta-command-cache company-cmake-executable-arguments arg nil make-hash-table :test equal company-cmake--fill-candidates-cache replace-regexp-in-string "-list$" "" gethash company-cmake--parse --dolist-tail-- company-cmake--candidates-cache prefix] 6])
(defalias 'company-cmake--unexpand-candidate #[(candidate) "\301\302\"\203 \303\304\305\"P\202E \301\306\"\203\" \304\307\"\310P\202E \301\311\"\2033 \304\307\"\312P\202E \301\313\"\203E \304\307\"\314\304\315\"Q\207" [candidate string-match "^CMAKE_\\(C\\|CXX\\|Fortran\\)\\(_.*\\)$" "CMAKE_<LANG>" match-string 2 "^\\(.*_\\)IS_GNU\\(C\\|CXX\\|G77\\)$" 1 "IS_GNU<LANG>" "^\\(.*_\\)OVERRIDE_\\(C\\|CXX\\|Fortran\\)$" "OVERRIDE_<LANG>" "^\\(.*\\)\\(_DEBUG\\|_RELEASE\\|_RELWITHDEBINFO\\|_MINSIZEREL\\)\\(.*\\)$" "_<CONFIG>" 3] 5])
(defalias 'company-cmake--meta #[(candidate) "\306	\"\307\310!\311\312!r\fq\210\313\216\314\307\315\307&\210eb\210\316y\210\317\320 \321 \"\322\323\324\n#\211-\207" [candidate company-cmake--meta-command-cache result cmd-opts #1=#:temp-buffer company-cmake-executable gethash nil company-cmake--unexpand-candidate generate-new-buffer " *temp*" #[nil "\301!\205	 \302!\207" [#1# buffer-name kill-buffer] 2] call-process t 2 buffer-substring-no-properties line-beginning-position line-end-position replace-regexp-in-string "^[ 	\n]+" ""] 8])
(defalias 'company-cmake--doc-buffer #[(candidate) "\305	\"\306!\307\310!rq\210\311\216\312\f\313\314\313\n&\210eb\210\315y\210\316\317\320 d\"!,\207" [candidate company-cmake--meta-command-cache cmd-opts #1=#:temp-buffer company-cmake-executable gethash company-cmake--unexpand-candidate generate-new-buffer " *temp*" #[nil "\301!\205	 \302!\207" [#1# buffer-name kill-buffer] 2] call-process nil t 2 company-doc-buffer buffer-substring-no-properties line-beginning-position] 7])
#@98 `company-mode' completion backend for CMake.
CMake is a cross-platform, open-source make system.
(defalias 'company-cmake #[(command &optional arg &rest ignored) "\305\306\"\203 \307\310!\207\305\311\"\203! 	\n>\205W ?\205  \312\313!\207\305\314\"\2037 	\n>\205W \315 ?\205W \316 \207\305\317\"\203B \320\f!\207\305\321\"\203M \322\f!\207\305\323\"\205W \324\f!\207" [command major-mode company-cmake-modes company-cmake-executable arg eql interactive company-begin-backend company-cmake init error "Company found no cmake executable" prefix company-in-string-or-comment company-grab-symbol candidates company-cmake--candidates meta company-cmake--meta doc-buffer company-cmake--doc-buffer] 3 (#$ . 5045) (list 'interactive)])
(provide 'company-cmake)
