?
Current Path : /usr/share/emacs/24.3/lisp/progmodes/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/progmodes/grep.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:25 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/progmodes/grep.el ;;; in Emacs version 24.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\302\303\304\305\306\307\306\310&\207" [require compile custom-declare-group grep nil "Run `grep' and display the results." :group tools processes] 8) #@266 Default values depending on target host. `grep-compute-defaults' returns default values for every local or remote host `grep' runs. These values can differ from host to host. Once computed, the default values are kept here in order to avoid computing them again. (defvar grep-host-defaults-alist nil (#$ . 735)) #@237 Set SYMBOL to VALUE, and update `grep-host-defaults-alist'. SYMBOL should be one of `grep-command', `grep-template', `grep-use-null-device', `grep-find-command', `grep-find-template', `grep-find-use-xargs', or `grep-highlight-matches'. (defalias 'grep-apply-setting #[(symbol value) "\203' \306\307 !\206\f \310!\211\236\311\236 \236A\240\210 \f\236A\240\210+\312 \"\207" [grep-host-defaults-alist default-directory host-id host-defaults defaults symbol intern file-remote-p "localhost" nil set-default value] 4 (#$ . 1056)]) (byte-code "\300\301\302\303\304\305\306\307\310\311& \210\300\312\313\314\304\315\316\317\306\307\310\311&\210\300\320\302\321\304\322\306\307\310\311& \210\300\323\302\324\304\325\316\317\310\311& \210\300\326\302\327\304\330\316\317\306\307\310\311&\210\300\331\332\333\304\334\316\317\310\311& \210\300\335\302\336\304\337\316\317\310\311& \210\300\340\302\341\304\342\316\317\306\307\310\311&\210\300\343\344\345\304\346\310\311&\210\300\347\350\351\304\352\310\311&\210\300\353\354\355\304\356\310\311&\210\300\357\302\360\304\361\306\307\310\311& \210\300\362\302\363\304\364\310\311&\207" [custom-declare-variable grep-window-height nil "Number of lines in a grep window. If nil, use `compilation-window-height'." :type (choice (const :tag "Default" nil) integer) :version "22.1" :group grep grep-highlight-matches 'auto-detect "Use special markers to highlight grep matches.\n\nSome grep programs are able to surround matches with special\nmarkers in grep output. Such markers can be used to highlight\nmatches in grep mode. This requires `font-lock-mode' to be active\nin grep buffers, so if you have globally disabled font-lock-mode,\nyou will not get highlighting.\n\nThis option sets the environment variable GREP_COLORS to specify\nmarkers for highlighting and GREP_OPTIONS to add the --color\noption in front of any explicit grep options before starting\nthe grep.\n\nWhen this option is `auto', grep uses `--color=auto' to highlight\nmatches only when it outputs to a terminal (when `grep' is the last\ncommand in the pipe), thus avoiding the use of any potentially-harmful\nescape sequences when standard output goes to a file or pipe.\n\nTo make grep highlight matches even into a pipe, you need the option\n`always' that forces grep to use `--color=always' to unconditionally\noutput escape sequences.\n\nIn interactive usage, the actual value of this variable is set up\nby `grep-compute-defaults' when the default value is `auto-detect'.\nTo change the default value, use Customize or call the function\n`grep-apply-setting'." (choice (const :tag "Do not highlight matches with grep markers" nil) (const :tag "Highlight matches with grep markers" t) (const :tag "Use --color=always" always) (const :tag "Use --color=auto" auto) (other :tag "Not Set" auto-detect)) :set grep-apply-setting grep-scroll-output "Non-nil to scroll the *grep* buffer window as output appears.\n\nSetting it causes the grep commands to put point at the end of their\noutput window so that the end of the output is always visible rather\nthan the beginning." boolean grep-command "The default grep command for \\[grep].\nIf the grep program used supports an option to always include file names\nin its output (such as the `-H' option to GNU grep), it's a good idea to\ninclude it when specifying `grep-command'.\n\nIn interactive usage, the actual value of this variable is set up\nby `grep-compute-defaults'; to change the default value, use\nCustomize or call the function `grep-apply-setting'." (choice string (const :tag "Not Set" nil)) grep-template "The default command to run for \\[lgrep].\nThe following place holders should be present in the string:\n <C> - place to put -i if case insensitive grep.\n <F> - file names and wildcards to search.\n <X> - file names and wildcards to exclude.\n <R> - the regular expression searched for.\n <N> - place to insert null-device.\n\nIn interactive usage, the actual value of this variable is set up\nby `grep-compute-defaults'; to change the default value, use\nCustomize or call the function `grep-apply-setting'." (choice string (const :tag "Not Set" nil)) grep-use-null-device 'auto-detect "If t, append the value of `null-device' to `grep' commands.\nThis is done to ensure that the output of grep includes the filename of\nany match in the case where only a single file is searched, and is not\nnecessary if the grep program used supports the `-H' option.\n\nIn interactive usage, the actual value of this variable is set up\nby `grep-compute-defaults'; to change the default value, use\nCustomize or call the function `grep-apply-setting'." (choice (const :tag "Do Not Append Null Device" nil) (const :tag "Append Null Device" t) (other :tag "Not Set" auto-detect)) grep-find-command "The default find command for \\[grep-find].\nIn interactive usage, the actual value of this variable is set up\nby `grep-compute-defaults'; to change the default value, use\nCustomize or call the function `grep-apply-setting'." (choice string (const :tag "Not Set" nil)) grep-find-template "The default command to run for \\[rgrep].\nThe following place holders should be present in the string:\n <D> - base directory for find\n <X> - find options to restrict or expand the directory list\n <F> - find options to limit the files matched\n <C> - place to put -i if case insensitive grep\n <R> - the regular expression searched for.\nIn interactive usage, the actual value of this variable is set up\nby `grep-compute-defaults'; to change the default value, use\nCustomize or call the function `grep-apply-setting'." (choice string (const :tag "Not Set" nil)) grep-files-aliases '(("all" . "* .*") ("el" . "*.el") ("ch" . "*.[ch]") ("c" . "*.c") ("cc" . "*.cc *.cxx *.cpp *.C *.CC *.c++") ("cchh" . "*.cc *.[ch]xx *.[ch]pp *.[CHh] *.CC *.HH *.[ch]++") ("hh" . "*.hxx *.hpp *.[Hh] *.HH *.h++") ("h" . "*.h") ("l" . "[Cc]hange[Ll]og*") ("m" . "[Mm]akefile*") ("tex" . "*.tex") ("texi" . "*.texi") ("asm" . "*.[sS]")) "Alist of aliases for the FILES argument to `lgrep' and `rgrep'." alist grep-find-ignored-directories vc-directory-exclusion-list "List of names of sub-directories which `rgrep' shall not recurse into.\nIf an element is a cons cell, the car is called on the search directory\nto determine whether cdr should not be recursed into." (choice (repeat :tag "Ignored directories" string) (const :tag "No ignored directories" nil)) grep-find-ignored-files (cons ".#*" (delq nil (mapcar (lambda (s) (unless (string-match-p "/\\'" s) (concat "*" s))) completion-ignored-extensions))) "List of file names which `rgrep' and `lgrep' shall exclude.\nIf an element is a cons cell, the car is called on the search directory\nto determine whether cdr should not be excluded." (choice (repeat :tag "Ignored file" string) (const :tag "No ignored files" nil)) grep-error-screen-columns "If non-nil, column numbers in grep hits are screen columns.\nSee `compilation-error-screen-columns'" (choice (const :tag "Default" nil) integer) grep-setup-hook "List of hook functions run by `grep-process-setup' (see `run-hooks')." hook] 12) #@73 Keymap for grep buffers. `compilation-minor-mode-map' is a cdr of this. (defvar grep-mode-map (byte-code "\302 \303 \"\210\304\305\306#\210\304\307\310#\210\304\311\312#\210\304\313\314#\210\304\315\316#\210\304\317\320#\210\304\321\322#\210\304\323\324#\210\304\325\326#\210\304\327\330#\210\304\331\332\302\332!B#\210\304\333\334#\210\304\335\336#\210\304\337\340#\210\304\341\342#\210\304\343\344#\210\304\345\346#\210\304\347\350#\210\304\351\352#\210\304\353\354#\210\304\355\356#\210\304\357\360#\210\304\361\362#\210)\207" [map compilation-minor-mode-map make-sparse-keymap set-keymap-parent define-key " " scroll-up-command "" scroll-down-command "" next-error-follow-minor-mode " " compile-goto-error "n" next-error-no-select "p" previous-error-no-select "{" compilation-previous-file "}" compilation-next-file " " compilation-next-error [backtab] compilation-previous-error [menu-bar grep] "Grep" [menu-bar grep compilation-kill-compilation] (menu-item "Kill Grep" kill-compilation :help "Kill the currently running grep process") [menu-bar grep compilation-separator2] ("----") [menu-bar grep compilation-compile] (menu-item "Compile..." compile :help "Compile the program including the current buffer. Default: run `make'") [menu-bar grep compilation-rgrep] (menu-item "Recursive grep..." rgrep :help "User-friendly recursive grep in directory tree") [menu-bar grep compilation-lgrep] (menu-item "Local grep..." lgrep :help "User-friendly grep in a directory") [menu-bar grep compilation-grep-find] (menu-item "Grep via Find..." grep-find :help "Run grep via find, with user-specified args") [menu-bar grep compilation-grep] (menu-item "Another grep..." grep :help "Run grep, with user-specified args, and collect output in a buffer.") [menu-bar grep compilation-recompile] (menu-item "Repeat grep" recompile :help "Run grep again") [menu-bar grep compilation-separator2] ("----") [menu-bar grep compilation-first-error] (menu-item "First Match" first-error :help "Restart at the first match, visit corresponding location") [menu-bar grep compilation-previous-error] (menu-item "Previous Match" previous-error :help "Visit the previous match and corresponding location") [menu-bar grep compilation-next-error] (menu-item "Next Match" next-error :help "Visit the next match and corresponding location")] 6) (#$ . 8173)) (defvar grep-mode-tool-bar-map (byte-code "\303\304!!\205E \304\305!!\306!\307\310\311\211\n\312\313\314\315&\210\307\313\316\211\n\312\310\314\317&\210\307\320\321\211\n\322\323\314\324&\210\307\325\326\211\n\314\327&\210\330\n \"*\207" [tool-bar-map help map keymapp butlast copy-keymap last tool-bar-local-item "left-arrow" previous-error-no-select :rtl "right-arrow" :help "Goto previous match" next-error-no-select "Goto next match" "cancel" kill-compilation :enable (let ((buffer (compilation-find-buffer))) (get-buffer-process buffer)) "Stop grep" "refresh" recompile "Restart grep" append] 9)) (defalias 'kill-grep 'kill-compilation) #@221 The most recent grep buffer. A grep buffer becomes most recent when you select Grep mode in it. Notice that using \[next-error] or \[compile-goto-error] modifies `compilation-last-buffer' rather than `grep-last-buffer'. (defvar grep-last-buffer nil (#$ . 11192)) #@72 Regexp used to match grep hits. See `compilation-error-regexp-alist'. (defconst grep-regexp-alist '(("^\\(.+?\\)\\(:[ ]*\\)\\([1-9][0-9]*\\)\\2" 1 3 ((lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face 'match))) (when mbeg (- mbeg beg))))) lambda nil (when grep-highlight-matches (let* ((beg (match-end 0)) (end (save-excursion (goto-char beg) (line-end-position))) (mbeg (text-property-any beg end 'font-lock-face 'match)) (mend (and mbeg (next-single-property-change mbeg 'font-lock-face nil end)))) (when mend (- mend beg)))))) ("^Binary file \\(.+\\) matches$" 1 nil nil 0 1)) (#$ . 11461)) #@62 Value to use for `compilation-first-column' in grep buffers. (defvar grep-first-column 0 (#$ . 12188)) #@45 Message to print when no matches are found. (defvar grep-error "grep hit" (#$ . 12297)) #@33 Face name to use for grep hits. (defvar grep-hit-face compilation-info-face (#$ . 12391)) #@43 Face name to use for grep error messages. (defvar grep-error-face 'compilation-error (#$ . 12487)) #@36 Face name to use for grep matches. (defvar grep-match-face 'match (#$ . 12592)) #@42 Face name to use for grep context lines. (defvar grep-context-face 'shadow (#$ . 12678)) #@106 Additional things to highlight in grep output. This gets tacked on the end of the generated expressions. (defvar grep-mode-font-lock-keywords '((": \\(.+\\): \\(?:Permission denied\\|No such \\(?:file or directory\\|device or address\\)\\)$" 1 grep-error-face) ("^Grep[/a-zA-z]* started.*" (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)) ("^Grep[/a-zA-z]* finished \\(?:(\\(matches found\\))\\|with \\(no matches found\\)\\).*" (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t) (1 compilation-info-face nil t) (2 compilation-warning-face nil t)) ("^Grep[/a-zA-z]* \\(exited abnormally\\|interrupt\\|killed\\|terminated\\)\\(?:.*with code \\([0-9]+\\)\\)?.*" (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t) (1 grep-error-face) (2 grep-error-face nil t)) ("^.+?-[0-9]+-.*\n" (0 grep-context-face))) (#$ . 12774)) #@145 The default grep program for `grep-command' and `grep-find-command'. This variable's value takes effect when `grep-compute-defaults' is called. (defvar grep-program (purecopy "grep") (#$ . 13660)) #@126 The default find program for `grep-find-command'. This variable's value takes effect when `grep-compute-defaults' is called. (defvar find-program (purecopy "find") (#$ . 13864)) #@154 The default xargs program for `grep-find-command'. See `grep-find-use-xargs'. This variable's value takes effect when `grep-compute-defaults' is called. (defvar xargs-program (purecopy "xargs") (#$ . 14049)) #@279 How to invoke find and grep. If `exec', use `find -exec {} ;'. If `exec-plus' use `find -exec {} +'. If `gnu', use `find -print0' and `xargs -0'. Any other value means to use `find -print' and `xargs'. This variable's value takes effect when `grep-compute-defaults' is called. (defvar grep-find-use-xargs nil (#$ . 14264)) #@24 History list for grep. (defvar grep-history nil (#$ . 14594)) #@29 History list for grep-find. (defvar grep-find-history nil (#$ . 14662)) (defvar grep-regexp-history nil) (defvar grep-files-history nil) #@122 Setup compilation variables and buffer for `grep'. Set up `compilation-exit-message-function' and run `grep-setup-hook'. (defalias 'grep-process-setup #[nil "\303=\203 \304 \210\303=\204: \203: \203: \305\306\307\"\210\305\310\311\310!\312\313=\203, \314\202- \315Q\"\210\305\316\317\"\210\305\320\321\"\210\322\302!\210\323\324\325!\207" [grep-highlight-matches font-lock-mode compilation-exit-message-function auto-detect grep-compute-defaults setenv "TERM" "emacs-grep" "GREP_OPTIONS" getenv " --color=" always "always" "auto" "GREP_COLOR" "01;31" "GREP_COLORS" "mt=01;31:fn=:ln=:bn=:se=:sl=:cx=:ne" make-local-variable #[(status code msg) "\303=\203 \304 !\203 \305 \203 \306\207\305 \204 \307\207\n B\207\n B\207" [status code msg exit zerop buffer-modified-p ("finished (matches found)\n" . "matched") ("finished with no matches found\n" . "no match")] 2] run-hooks grep-setup-hook] 6 (#$ . 14806)]) #@130 Handle match highlighting escape sequences inserted by the grep process. This function is called from `compilation-filter-hook'. (defalias 'grep-filter #[nil "\212\304y\210`\305\nb\210\304y\210`` W\205G \306 !\307\310 \311#\2033 \312\313\314\311!\315\305\316%\317\211#\210\202 b\210\307\320 \311#\205G \312\321\317\211#\210\2026 +\207" [beg end compilation-filter-start grep-match-face 0 nil copy-marker re-search-forward "\\[0?1;31m\\(.*?\\)\\[[0-9]*m" 1 replace-match propertize match-string face font-lock-face t "\\[[0-9;]*[mK]" ""] 7 (#$ . 15731)]) (defalias 'grep-probe #[(command args &optional func result) "\302\211\303\304\217 \206 \305\232)\207" [process-file-side-effects result nil (byte-code "\303\206 \304 \n#\207" [func command args apply process-file] 4) ((error)) 0] 4]) (defalias 'grep-compute-defaults #[nil "\204# \306\300\307\301 D\302\nD\303D\304\fD\305 D\310D\311 D\257B\"\210\312\313@!\206, \314!\211A\236B\307\236C\315\307D\211E\203f E@\211D\211B\236\206U DC\236\211FA@)L\210EA\211E\204C *\203\265 \316=\204\265 \317\320!GrGq\210\321\216\322\323H\"I \203\227 \324 \307\316\307\325I\257\326#\202\244 \324J\307\316\307\327\325I\257\"\205\262 eb\210\330\331I!\332P!,? \203\305 \f\203\305 \n\203\305 \204\373\203\315 \333\202\316 \327\324J\307\211\211\334\335K\257\307\336$\205\341 \337PL \204\360 \340\341JL#\n\204\374 \340\342JL#\2046\324M\307\211\211K\343BBBB\"\203\344\2024\324M\307\211\211K\345BBBB\"\2033\324N\346\"\2033\347\2024\350\f\204\227\347=\203L\340\351MN $\202\226\352>\203\216\340\353M #\203e\340\354K\"\202f\355OP\344=\203{\340\356PO#\202\205\340\357PO\360\361!$PGT*B\202\226\340\362MN $ \204\372\340\363JL#\203\256\340\354K\"\202\257\355OQ\347=\203\306\340\364MNQ$\202\370\350=\203\334\340\365MQO\360\361!%\202\370\344=\203\357\340\366MQO$\202\370\340\367MNQ$*) \370=\2030\317\320!RrRq\210\371\216\324J\372\"\205-eb\210\373\374\307\316#\205-S\375>\203,\376\202-\377+ \201T A\236\"\306\300A\301 D\302\nD\303D\304\fD\305 D\310D\311 D\257B\"+\207" [grep-host-defaults-alist grep-command grep-template grep-use-null-device grep-find-command grep-find-template add-to-list nil grep-find-use-xargs grep-highlight-matches intern file-remote-p "localhost" (grep-command grep-template grep-use-null-device grep-find-command grep-find-template grep-find-use-xargs grep-highlight-matches) t generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1=#:temp-buffer buffer-name kill-buffer] 2)) expand-file-name "HELLO" grep-probe "^English" call-process-shell-command "-nH" looking-at regexp-quote ":[0-9]+:English" "-n" "-e" "foo" 1 " -e" format "%s %s " "%s <X> <C> %s <R> <F>" ("-exec" "echo" "{}" "+") exec-plus ("-print0") (nil nil nil "-0" "-e" "echo") gnu exec "%s . -type f -print0 | \"%s\" -0 -e %s" (exec exec-plus) "%s . -type f -exec %s" "%s " "" "%s %s{} +" "%s {} %s%s" shell-quote-argument ";" "%s . -type f -print | \"%s\" %s" "%s <C> %s <R>" "%s . <X> -type f <F> -print0 | \"%s\" -0 -e %s" "%s . <X> -type f <F> -exec %s {} %s%s" "%s . <X> -type f <F> -exec %s %s{} +" "%s . <X> -type f <F> -print | \"%s\" %s" auto-detect ((byte-code "\301!\203\n \302!\210\301\207" [#2=#:temp-buffer buffer-name kill-buffer] 2)) (nil t nil "--help") search-forward "--color" (windows-nt ms-dos) always auto default-directory host-id host-defaults defaults setting --dolist-tail-- x #1# data-directory hello-file grep-program null-device grep-options find-program xargs-program null cmd0 gcmd #2# system-type delete] 12]) (defalias 'grep-tag-default #[nil "\203 \203 `\304 U\204 \305`\304 \"\206' \n\206\"