Files
emacsd/elpa/company-20191127.16/company-files.elc

30 lines
4.3 KiB
Plaintext
Raw Normal View History

;ELC
;;; Compiled
;;; in Emacs version 26.3
;;; 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\305\312\313\314\315\316&\207" [require company cl-lib custom-declare-group company-files nil "Completion backend for file names." :group custom-declare-variable company-files-exclusions "File name extensions and directory names to ignore.\nThe values should use the same format as `completion-ignored-extensions'." :type (const string) :package-version (company . "0.9.1")] 8)
(defalias 'company-files--directory-files #[(dir prefix) "\3041(\305\306 \"\307\" \203\310\n!\311\232\203$\312\313\312\314\n\"\"\202%\n)0\207\210\315\207" [prefix dir comp company-files-exclusions (file-error) sort file-name-all-completions #[(s1 s2) "\227 \227\231\207" [s1 s2] 2] company-files--exclusions-filtered "" delete "../" "./" nil] 5])
(defalias 'company-files--exclusions-filtered #[(completions) "\306\307\"\310 \" \311\211\f\f:\2039\f@\307 !\203% \235\202)\312\313\n\"\2042 \fB\f\fA\211\202\f\237-\207" [company-files-exclusions dir-exclusions file-exclusions completions #1=#:--cl-var-- c cl-delete-if-not company-files--trailing-slash-p cl-set-difference nil cl-find-if #[(exclusion) "\302 \"\207" [exclusion c string-suffix-p] 3] #2=#:--cl-var--] 4])
(defvar company-files--regexps (byte-code "\303=\203\n\304\202 \305\306 \307Q\310\n\311Q\312\n\313Q\314\n\315QE*\207" [system-type root begin windows-nt "[a-zA-Z]:/" "/" "\\(?:\\.\\{1,2\\}/\\|~/\\|" "\\)" "\"\\(" "[^\"\n]*\\)" "'\\(" "[^'\n]*\\)" "\\(?:[ =]\\|^\\)\\(" "[^ \n]*\\)"] 5))
(defalias 'company-files--grab-existing-name #[nil "\305\211\3062+\n\305\211\205)\f@\307 \310\"\211\203!\311\306 \"\210\fA\211\204\305*0\205K\312 !\205K\313 !\211\205K\314\315\"?\205K\316!\205K *\207" [dir file company-files--regexps regexp --dolist-tail-- nil --cl-block-nil-- company-grab-line 1 throw company-files--connected-p file-name-directory string-match "//" file-exists-p] 4])
(defalias 'company-files--connected-p #[(file) "\301!?\206\f\301\302\303#\207" [file file-remote-p nil t] 4])
(defalias 'company-files--trailing-slash-p #[(file) "G\211\302V\205 SH\303=)\207" [file len 0 47] 3])
(defvar company-files--completion-cache nil)
(defalias 'company-files--complete #[(prefix) "\306!\307!\211\310 !\311\312 !8E\f\313 @\"\204K\314\315\316 \n\"\"\317 !?\2053\320\321\"\211\205>\322\323\" \324\"B+\325A\",\207" [prefix dir file key read-file-name-completion-ignore-case completion-ignore-case file-name-directory file-name-nondirectory expand-file-name 5 file-attributes company-file--keys-match-p mapcar #[(f) " P\207" [dir f] 2] company-files--directory-files file-remote-p cl-remove-if-not #[(f) "\301!\205\302!?\205\303!\207" [f company-files--trailing-slash-p file-remote-p company-files--connected-p] 2] cl-mapcan #[(d) "\301\302\303\304\"\"\207" [d mapcar #[(c) " P\207" [d c] 2] company-files--directory-files ""] 5] append all-completions company-files--completion-cache candidates directories children] 6])
(defalias 'company-file--keys-match-p #[(new old) "A A\232\205\302@ @\"\207" [old new string-prefix-p] 3])
#@178 `company-mode' completion backend existing file names.
Completions works for proper absolute and relative files paths.
File paths with spaces are only supported inside strings.
(defalias 'company-files #[(command &optional arg &rest ignored) "\302\303\"\203 \304\305!\207\302\306\"\203\307 \207\302\310\"\203 \311 !\207\302\312\"\2031\313\314\315 !!!\316B\207\302\317\"\203B\320 !\205S\321\322!\207\302\323\"\203K\324\207\302\325\"\205S\324\207" [command arg eql interactive company-begin-backend company-files prefix company-files--grab-existing-name candidates company-files--complete location dired-noselect file-name-directory directory-file-name 1 post-completion company-files--trailing-slash-p delete-char -1 sorted t no-cache] 4 (#$ . 3562) (list 'interactive)])
(provide 'company-files)