%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/progmodes/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/progmodes/project.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; 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.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'cl-generic)
#@231 Special hook to find the project containing a given directory.
Each functions on this hook is called in turn with one
argument (the directory) and should return either nil to mean
that it is not applicable, or a project instance.
(defvar project-find-functions (list 'project-try-vc) (#$ . 431))
#@320 Return the project instance in DIR or `default-directory'.
When no project found in DIR, and MAYBE-PROMPT is non-nil, ask
the user for a different directory to look in.  If that directory
is not a part of a detectable project either, return a
`transient' project instance rooted in it.

(fn &optional MAYBE-PROMPT DIR)
(defalias 'project-current #[512 "\211\204\262\301!\211\204-\203-\302\303\304\305$\262\301!\262\211\204-\306\307\"\210\310B\262\211\207" [default-directory project--find-in-directory read-directory-name "Choose the project directory: " nil t message "Using `%s' as a transient project root" transient] 8 (#$ . 734)])
#@12 

(fn DIR)
(defalias 'project--find-in-directory #[257 "\300\301\"\207" [run-hook-with-args-until-success project-find-functions] 4 (#$ . 1392)])
(byte-code "\300\301\302\301\303\304#\305#\210\300\306\302\306\307\304#\310#\210\311\306\304\307\304\312%\210\300\313\302\313\314\304#\315#\210\311\313\304\314\304\316%\207" [defalias project-roots cl-generic-define (project) nil "Return the list of directory roots of the current project.\n\nMost often it's just one directory which contains the project\nbuild file and everything else in the project.  But in more\nadvanced configurations, a project can span multiple directories.\n\nThe directory names should be absolute.\n\n(fn PROJECT)" project-external-roots (_project) "Return the list of external roots for PROJECT.\n\nIt's the list of directories outside of the project that are\nstill related to it.  If the project deals with source code then,\ndepending on the languages used, this list should include the\nheaders search path, load path, class path, and so on.\n\nThe rule of thumb for whether to include a directory here, and\nnot in `project-roots', is whether its contents are meant to be\nedited together with the rest of the project.\n\n(fn PROJECT)" cl-generic-define-method #[257 "\300\207" [nil] 2 "\n\n(fn PROJECT)"] project-ignores (_project _dir) "Return the list of glob patterns to ignore inside DIR.\nPatterns can match both regular files and directories.\nTo root an entry, start it with `./'.  To match directories only,\nend it with `/'.  DIR must be one of `project-roots' or\n`project-external-roots'.\n\n(fn PROJECT DIR)" #[514 "\302\303!\210\304\305\"	\244\207" [vc-directory-exclusion-list grep-find-ignored-files require grep mapcar #[257 "\211\300P\207" ["/"] 3 "\n\n(fn DIR)"]] 5 "\n\n(fn PROJECT DIR)"]] 6)
#@18 

(fn ALL-FILES)
(defalias 'project--file-completion-table #[257 "\300\301\302\303\304!\305\"\306\307%\207" [make-byte-code 771 "\211\301=\203\302\207\303\300$\207" vconcat vector [metadata (metadata (category . project-file)) complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] 7 (#$ . 3193)])
(byte-code "\300\301\302\303\302\304%\210\305\306\307\306\310\302#\311#\210\300\306\302\310\302\312%\207" [cl-generic-define-method project-roots nil ((project (head transient))) #[257 "\211AC\207" [] 2 "\n\n(fn PROJECT)"] defalias project-files cl-generic-define (project &optional dirs) "Return a list of files in directories DIRS in PROJECT.\nDIRS is a list of absolute directories; it should be some\nsubset of the project roots and external roots.\n\nThe default implementation uses `find-program'.  PROJECT is used\nto find the list of ignores for each directory.\n\n(fn PROJECT &optional DIRS)" #[513 "\300\301\302\303\304\305!\306\"\307\310%\206\311!\"\207" [cl-mapcan make-byte-code 257 "\301\302\300\"\"\207" vconcat vector [project--files-in-directory project--dir-ignores] 6 "\n\n(fn DIR)" project-roots] 9 "\n\n(fn PROJECT &optional DIRS)"]] 6)
#@36 

(fn DIR IGNORES &optional FILES)
(defalias 'project--files-in-directory #[770 "\303\304!\210\303\305!\210\306\307!!\310\311	\312\"\2038\313\314!\315\n\315\316\313\317
!\320\n\315Q#\315\313\321!\260\2029\322%\323\324\317\325!\326\327#\330\"!)\207" [default-directory find-program find-name-arg require find-dired xref file-local-name expand-file-name format "%s %s %s -type f %s -print0" xref--find-ignores-arguments shell-quote-argument "(" " " mapconcat split-string " -o " ")" "" project--remote-file-names sort shell-command-to-string "" t string<] 19 (#$ . 4369)])
#@92 Return LOCAL-FILES as if they were on the system of `default-directory'.

(fn LOCAL-FILES)
(defalias 'project--remote-file-names #[257 "\301!\211\204\202\302\303\304\305\306\307!\310\"\311\312%\"\207" [default-directory file-remote-p mapcar make-byte-code 257 "\300P\207" vconcat vector [] 3 "\n\n(fn FILE)"] 9 (#$ . 4962)])
(byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314DD\315\316\317\320\321&\207" [custom-declare-group project-vc nil "Project implementation using the VC package." :version "25.1" :group tools custom-declare-variable project-vc-ignores funcall function #[0 "\300\207" [nil] 1] "List of patterns to include in `project-ignores'." :type (repeat string) :safe listp] 8)
#@267 Function that returns a list of external roots.

It should return a list of directory roots that contain source
files related to the current buffer.

The directory names should be absolute.  Used in the VC project
backend implementation of `project-external-roots'.
(defvar project-vc-external-roots-function #[0 "\207" [tags-table-list] 1] (#$ . 5691))
#@12 

(fn DIR)
(defalias 'project-try-vc #[257 "\3001\301!0\202
\210\302\211\303=\203%\304\305\"\206<\306\305\307\310\"#\202<\211\204-\302\202<\3111:\312\313#0\202<\210\302\211\205C\314B\207" [(error) vc-responsible-backend nil Git vc-file-getprop project-git-root vc-file-setprop vc-find-root ".git/" (error) vc-call-backend root vc] 8 (#$ . 6052)])
(byte-code "\300\301\302\303\302\304%\210\300\305\302\306\302\307%\210\300\310\302\311\302\312%\207" [cl-generic-define-method project-roots nil ((project (head vc))) #[257 "\211AC\207" [] 2 "\n\n(fn PROJECT)"] project-external-roots ((project (head vc))) #[257 "\301\302\303\304 \"!\305!\"\207" [project-vc-external-roots-function project-subtract-directories project-combine-directories mapcar file-name-as-directory project-roots] 6 "\n\n(fn PROJECT)"] project-files ((project (head vc)) &optional dirs) #[513 "\300\301\302\303\304\305!\306\"\307\310%\206\311!\"\207" [cl-mapcan make-byte-code 257 "\302\303\300A\"\2032\304!\211\262\2032\211\305=\204*\211\306=\2032	\203*\307\310\311 \"\2032\312	#\2029\313\314\300\"\"\207" vconcat vector [project-vc-ignores nil file-equal-p vc-responsible-backend Hg Git version<= "1.9" vc-git--program-version project--vc-list-files project--files-in-directory project--dir-ignores] 7 "\n\n(fn DIR)" project-roots] 9 "\n\n(fn PROJECT &optional DIRS)"]] 6)
#@34 

(fn DIR BACKEND EXTRA-IGNORES)
(defalias 'project--vc-list-files #[771 "\301\267\202\227\302\303!!\304\305\306\307\"\262\203%\306\310\311\312\"B\"\262\311\313\314\315\316\305\317$\320\321#\"\262\322 \311\323\324\325\326\327\"\330\"\331\332%\"\315\333#\266\203)\207\302\303!!\305\211\334\244\262\203k\211\335\336\"\244\262\337\340!r\211q\210\323\341\342\326\327!\343\"\344$\216\315\345\321\341\346\347&\210\311\350\314\351 \320\321#\"*\262)\207\305\207" [default-directory #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (Git 6 Hg 82)) expand-file-name file-name-as-directory ("-z") nil append ("-c" "-o" "--exclude-standard") "--" mapcar #[257 "\300\301\"\203\302\303\304\305\"\"\207\302\306\"\207" [string-match "\\./" format ":!/:%s" substring 2 ":!:%s"] 6 "\n\n(fn I)"] #[257 "P\207" [default-directory] 3 "\n\n(fn FILE)"] split-string apply vc-git--run-command-string "ls-files" "" t project--git-submodules make-byte-code 257 "\303!\205
\304\nP\300\301#\207" vconcat vector [default-directory file-directory-p project--vc-list-files] 5 "\n\n(fn MODULE)" nconc ("-mcardu" "--no-status" "-0") mapcan #[257 "\300D\207" ["--exclude"] 3 "\n\n(fn I)"] generate-new-buffer " *temp*" 0 "\301\300!\205	\302\300!\207" [buffer-name kill-buffer] 2 vc-hg-command "." "status" #[257 "P\207" [default-directory] 3 "\n\n(fn S)"] buffer-string] 15 (#$ . 7440)])
(defalias 'project--git-submodules #[0 "\3001:\301\302!r\211q\210\303\304\305\306\307!\310\"\311$\216\312\313!\210\314eb\210\315\316\314\317#\2031\320\321!B\262\202\211\237\262*\2620\207\210\314\207" [(file-missing) generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents ".gitmodules" nil re-search-forward "path *= *\\(.+\\)" t match-string 1] 7])
(cl-generic-define-method 'project-ignores nil '((project (head vc)) dir) nil #[514 "A\301\302\303\"\205\304!\262\305\306\307\310#\"\311\312\"\305\313\"#\207" [vc-directory-exclusion-list nil append file-equal-p vc-responsible-backend mapcar #[257 "\300\301\"\203\302\303\304\211$\207\207" [string-match "\\`/" replace-match "./" t] 6 "\n\n(fn ENTRY)"] vc-call-backend ignore-completion-table project--value-in-dir project-vc-ignores #[257 "\211\300P\207" ["/"] 3 "\n\n(fn DIR)"]] 11 "\n\n(fn PROJECT DIR)"])
#@226 Return a sorted and culled list of directory names.
Appends the elements of LISTS-OF-DIRS together, removes
non-existing directories, as well as directories a parent of
whose is already in the list.

(fn &rest LISTS-OF-DIRS)
(defalias 'project-combine-directories #[128 "\300\301\302\303\304\"\"\305\"\211\211A\203*\306@A@\"\203#\211AA\241\210\202\211A\262\202\307\310\"\207" [sort mapcar #[257 "\300\301!!\207" [file-name-as-directory expand-file-name] 4 "\n\n(fn DIR)"] apply append string< string-prefix-p cl-delete-if-not file-exists-p] 7 (#$ . 9857)])
#@116 Return a list of elements from FILES that are outside of DIRS.
DIRS must contain directory names.

(fn FILES DIRS)
(defalias 'project-subtract-directories #[514 "\300\301\302$\207" [cl-set-difference :test file-in-directory-p] 7 (#$ . 10434)])
#@16 

(fn VAR DIR)
(defalias 'project--value-in-dir #[514 "\302\303!r\211q\210\304\305\306\307\310!\311\"\312$\216\313\314 \210)J*\207" [default-directory enable-local-variables generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 :all hack-dir-local-variables-non-file-buffer] 9 (#$ . 10686)])
#@431 Find all matches for REGEXP in the current project's roots.
With \[universal-argument] prefix, you can specify the directory
to search in, and the file name pattern to search for.  The
pattern may use abbreviations defined in `grep-files-aliases',
e.g. entering `ch' is equivalent to `*.[ch]'.  As whitespace
triggers completion when entering a pattern, including it
requires quoting, e.g. `\[quoted-insert]<space>'.

(fn REGEXP)
(defalias 'project-find-regexp #[257 "\302\303!\210\302\304!\210\305\306!\307!@	\204\310\307!\"\202-\311\312\313\306$\314\313\315!#\262\316\317\320#\313\")\207" [default-directory current-prefix-arg require xref grep project-current t project-roots project-files read-directory-name "Base directory: " nil project--files-in-directory grep-read-files xref--show-xrefs apply-partially project--find-regexp-in-files] 8 (#$ . 11057) (byte-code "\300 C\207" [project--read-regexp] 1)])
#@20 

(fn PROJECT DIR)
(defalias 'project--dir-ignores #[514 "\300!\301\302\303$\211\204\304\305\211\"\202)\304\"\306\"\203#\211\202'\307\310\"\262\207" [project-roots cl-find :test file-in-directory-p project-ignores nil file-equal-p cl-delete-if #[257 "\300\301\"\207" [string-prefix-p "./"] 4 "\n\n(fn STR)"]] 8 (#$ . 11988)])
#@170 Find all matches for REGEXP in the project roots or external roots.
With \[universal-argument] prefix, you can specify the file name
pattern to search for.

(fn REGEXP)
(defalias 'project-or-external-find-regexp #[257 "\301\302!\210\303\304!\305!@\306\307\305!\310!\"\"\311\312\313#\314\")\207" [default-directory require xref project-current t project-roots project-files append project-external-roots xref--show-xrefs apply-partially project--find-regexp-in-files nil] 8 (#$ . 12336) (byte-code "\300 C\207" [project--read-regexp] 1)])
#@21 

(fn REGEXP FILES)
(defalias 'project--find-regexp-in-files #[514 "\211\204\300\301!\210\302\"\211\204\300\303\"\210\211\207" [user-error "Empty file list" xref-matches-in-files "No matches for: %s"] 6 (#$ . 12887)])
#@62 

(fn START END PROGRAM &optional BUFFER DISPLAY &rest ARGS)
(defalias 'project--process-file-region #[1411 "\301!\204\302\303\304&\207\305\306!\307\310\311\312\313!\314\"\315$\216\316\304\317%\210\302\320&)\207" [default-directory file-remote-p apply call-process-region nil make-temp-file "ppfr" make-byte-code 0 "\301\300!\207" vconcat vector [delete-file] 2 write-region silent process-file] 15 (#$ . 13118)])
(defalias 'project--read-regexp #[0 "\300\301!\302\303\205\f\304!\"\207" [thing-at-point symbol read-regexp "Find regexp" regexp-quote] 5])
#@135 Visit a file (with completion) in the current project's roots.
The completion default is the filename at point, if one is
recognized.
(defalias 'project-find-file #[0 "\300\301!\302!\303\304\305!#\207" [project-current t project-roots project-find-file-in thing-at-point filename] 6 (#$ . 13714) nil])
#@153 Visit a file (with completion) in the current project's roots or external roots.
The completion default is the filename at point, if one is
recognized.
(defalias 'project-or-external-find-file #[0 "\300\301!\302\303!\304!\"\305\306\307!#\207" [project-current t append project-roots project-external-roots project-find-file-in thing-at-point filename] 6 (#$ . 14026) nil])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable project-read-file-name-function funcall function #[0 "\300\207" [project--read-file-cpd-relative] 1] "Function to call to read a file name from a list.\nFor the arguments list, see `project--read-file-cpd-relative'." :type (choice (const :tag "Read with completion from relative names" project--read-file-cpd-relative) (const :tag "Read with completion from absolute names" project--read-file-absolute) (function :tag "Custom function" nil)) :version "27.1"] 8)
#@229 Read a file name, prompting with PROMPT.
ALL-FILES is a list of possible file name completions.
PREDICATE, HIST, and DEFAULT have the same meaning as in
`completing-read'.

(fn PROMPT ALL-FILES &optional PREDICATE HIST DEFAULT)
(defalias 'project--read-file-cpd-relative #[1282 "\300\301\"\211G\302V\205\303!\262\211G\211\302U\203\202$\304\305\"P\306\307\310\311\312\313!\314\"\315\316%\"\317!\320\n\n\n%P\207" [try-completion "" 0 file-name-directory format " in %s" mapcar make-byte-code 257 "\301\300\"\207" vconcat vector [substring] 4 "\n\n(fn S)" project--file-completion-table project--completing-read-strict] 16 (#$ . 14959)])
#@58 

(fn PROMPT ALL-FILES &optional PREDICATE HIST DEFAULT)
(defalias 'project--read-file-absolute #[1282 "\300\301!%\207" [project--completing-read-strict project--file-completion-table] 11 (#$ . 15626)])
#@88 Complete FILENAME in DIRS in PROJECT and visit the result.

(fn FILENAME DIRS PROJECT)
(defalias 'project-find-file-in #[771 "\301\"\302\303\211%\211\304\230\203\305\306!\202\307!\207" [project-read-file-name-function project-files "Find file" nil "" user-error "You didn't specify the file" find-file] 10 (#$ . 15841)])
#@59 

(fn PROMPT COLLECTION &optional PREDICATE HIST DEFAULT)
(defalias 'project--completing-read-strict #[1282 "\211\203\211\300\230\204\301\302#\202\301\303\"\304\305\306&\211\232\203I\307#\204I\304\301\303	\"\305	\306&\262\207" ["" format "%s (default %s): " "%s: " completing-read t nil test-completion] 15 (#$ . 16179)])
#@174 Search for REGEXP in all the files of the project.
Stops when a match is found.
To continue searching for the next match, use the
command \[fileloop-continue].

(fn REGEXP)
(defalias 'project-search #[257 "\300\301\302\303!!\304#\210\305 \207" [fileloop-initialize-search project-files project-current t default fileloop-continue] 6 (#$ . 16546) "sSearch (regexp): "])
#@253 Query-replace REGEXP in all the files of the project.
Stops when a match is found and prompts for whether to replace it.
If you exit the query-replace, you can later continue the query-replace
loop using the command \[fileloop-continue].

(fn FROM TO)
(defalias 'project-query-replace-regexp #[514 "\300\301\302\303!!\304$\210\305 \207" [fileloop-initialize-replace project-files project-current t default fileloop-continue] 8 (#$ . 16923) (byte-code "\300\301\302\211#\211@A\211@A\211D\266\202\207" [query-replace-read-args "Query replace (regexp)" t] 9)])
(provide 'project)

Zerion Mini Shell 1.0