MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.117.158.174
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/progmodes/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/progmodes/executable.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:24 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/progmodes/executable.el
;;; in Emacs version 24.3.1
;;; with all optimizations.
;;; Function definitions are lazy-loaded.

;;; 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\302\303\304\305%\210\306\307\310\311\312\313\304\301&\210\306\314\315\316\312\317\304\301&\210\306\320\321\322\312\323\304\301&\210\306\324\325\326\327\330\312\331\304\301&	\210\306\332\333\334\312\335\304\301&\207" [custom-declare-group executable nil "Base functionality for executable interpreter scripts." :group processes custom-declare-variable executable-insert t "Non-nil means offer to add a magic number to a file.\nThis takes effect when you switch to certain major modes,\nincluding Shell-script mode (`sh-mode').\nWhen you type \\[executable-set-magic], it always offers to add or\nupdate the magic number." :type boolean executable-query 'function "If non-nil, ask user before changing an existing magic number.\nWhen this is `function', only ask when called non-interactively." (choice (const :tag "Don't Ask" nil) (const :tag "Ask when non-interactive" function) (other :tag "Ask" t)) executable-magicless-file-regexp "/[Mm]akefile$\\|/\\.\\(z?profile\\|bash_profile\\|z?login\\|bash_login\\|z?logout\\|bash_logout\\|.+shrc\\|esrc\\|rcrc\\|[kz]shenv\\)$" "On files with this kind of name no magic is inserted or changed." regexp executable-prefix "#!" "Interpreter magic number prefix inserted when there was no magic number." :version "24.3" string executable-chmod 73 "After saving, if the file is not executable, set this mode.\nThis mode passed to `set-file-modes' is taken absolutely when negative, or\nrelative to the files existing modes.  Do nothing if this is nil.\nTypical values are 73 (+x) or -493 (rwxr-xr-x)." (choice integer (const nil))] 10)
(defvar executable-command nil)
#@142 Command you use with argument `+2' to make text files self-display.
Note that the like of `more' doesn't work too well under Emacs \[shell].
(custom-declare-variable 'executable-self-display "tail" '(#$ . 2237) :type 'string :group 'executable)
#@136 Rules for highlighting executable scripts' magic number.
This can be included in `font-lock-keywords' by modes that call `executable'.
(defvar executable-font-lock-keywords '(("\\`#!.*/\\([^ 	\n]+\\)" 1 font-lock-keyword-face t)) (#$ . 2489))
#@85 Alist of regexps used to match script errors.
See `compilation-error-regexp-alist'.
(defvar executable-error-regexp-alist '(("^\\(.*[^[/]\\)\\(\\[[0-9]+\\]\\)?: .* error .* line \\([0-9]+\\)" 1 3) ("^\\(.*[^/]\\)\\[\\([0-9]+\\)\\]: .*: " 1 2) ("^\\(.*[^/]\\): [^0-9\n]+\n\\1: \\1: line \\([0-9]+\\):" 1 2) (" error .* line \\([0-9]+\\) of file \\(.+\\)$" 2 1) ("^[^ ].+\n\\( .+\n\\)* line \\([0-9]+\\) of file \\(.+\\)$" 3 2) ("^\\(.+\\):\\([0-9]+\\): " 1 2)) (#$ . 2738))
(defvaralias 'executable-binary-suffixes 'exec-suffixes)
#@100 Check if PROGRAM handles arguments Posix-style.
If PROGRAM is non-nil, use that instead of "find".
(defalias 'executable-command-find-posix-p #[(&optional program) #@405 ("\305!\306	\307\310#@\311\312!rq\210\313\216\314\f\2060\315\307p\307	\316\n\317\320&	\210eb\210\321\n\307\322#\20520\322-\207" . [data-directory dir file #1=#:temp-buffer program file-truename directory-files nil "^[^.]" generate-new-buffer " *temp*" ((byte-code "\301!\203\n0\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) call-process "find" "-name" "-maxdepth" "1" search-forward t])(#$ . 3446) nil 10 (#$ . 3275)])
#@170 This gets called after saving a file to assure that it be executable.
You can set the absolute or relative mode in variable `executable-chmod' for
non-executable files.
(defalias 'executable-chmod #[nil #@175 ("\205\"0	\205\"0\302	!\206\"0\303	\304W\2030[\202!0\305\306	!\"\"\207" . [executable-chmod buffer-file-name file-executable-p set-file-modes 0 logior file-modes])(#$ . 4099) nil 6 (#$ . 3889)])
#@275 Run script with user-specified args, and collect output in a buffer.
While script runs asynchronously, you can use the \[next-error]
command to find the next error.  The buffer is also in `comint-mode' and
`compilation-shell-minor-mode', so that you can answer any prompts.
(defalias 'executable-interpret #[(command) #@308 ("\305\306!\210\307?!\210\310\302!\210	\311	\312\313#)\207" . [compilation-ask-about-save command executable-command executable-error-regexp-alist compilation-error-regexp-alist require compile save-some-buffers make-local-variable compilation-start t #[(_x) "\300\207" [#1="*interpretation*"] 1 #1#]])(#$ . 4636) nil 4 (#$ . 4311) (list (read-string "Run script: " (or executable-command buffer-file-name)))])
#@293 Set this buffer's interpreter to INTERPRETER with optional ARGUMENT.
The variables `executable-magicless-file-regexp', `executable-prefix',
`executable-insert', `executable-query' and `executable-chmod' control
when and how magic numbers are inserted or replaced and scripts made
executable.
(defalias 'executable-set-magic #[(interpreter &optional argument no-query-flag insert-flag) #@1046 ("\306!\203\n0\2020\307!\2060\310\311\"\312\313\"\203%0\314\315\316\211$\202&0	\20510\315	\231\20510\317	Q\n\204\2760\203C0\312\f\"\204\2760
\204L0!\203\2760e\320V\204\2760\212eb\210\321\322\323\316\324$\210\325\326!\203\2560\320\224b\203\2750\320\225Sf\327U\204\2750	`\320\225{\230\204\2750\"\203\2330#\204\2330\330 $\331\216\332p!\210\333\334%	\335R!*\203\2750\314	\324\211\316\320%\210\336\337%	P\"\210\202\2750%	\340\261\210\336\337%	P\"\210)\207" . [interpreter argument buffer-read-only buffer-file-name executable-magicless-file-regexp insert-flag file-name-absolute-p executable-find error "Interpreter %s not recognized" string-match "\\`/:" replace-match "" nil " " 1 add-hook after-save-hook executable-chmod t looking-at "#![ 	]*\\(.*\\)$" 32 current-window-configuration ((set-window-configuration #1=#:wconfig)) switch-to-buffer y-or-n-p "Replace magic number by `" "'? " message "Magic number changed to `%s'" 10 executable-insert executable-query no-query-flag #1# executable-prefix])(#$ . 5451) nil 6 (#$ . 5058) (let* ((name (read-string "Name or file name of interpreter: ")) (arg (read-string (format "Argument for %s: " name)))) (list name arg (eq executable-query 'function) t))])
#@121 Turn a text file into a self-displaying Un*x command.
The magic number of such a command displays all lines but itself.
(defalias 'executable-self-display #[nil #@106 ("\301=\2030\302\302	\303\"\207" . [this-command executable-self-display executable-set-magic "+2"])(#$ . 6873) nil 3 (#$ . 6705) nil])
#@152 Make file executable according to umask if not already executable.
If file already has any execute bits set at all, do not change existing
file modes.
(defalias 'executable-make-buffer-file-executable-if-script-p #[nil #@373 ("\300 \301Y\2050\214~\210e\301e\\{\302\230)\2050\303\304\305\217\207" . [buffer-size 2 "#!" nil (byte-code "\302\303 !\304\305 \306\"\304\306\"\307U?\206#0\310	!\206#0\311\303 \312	\"\"*\207" [current-mode add-mode file-modes buffer-file-name logand default-file-modes 73 0 zerop set-file-modes logior] 5) ((error (message "Unable to make file executable")))])(#$ . 7246) nil 3 (#$ . 7020)])
(provide 'executable)

MMCT - 2023