%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/progmodes/ |
Current File : //usr/local/share/emacs/27.2/lisp/progmodes/executable.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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (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\302\333\327\330\312\313\304\301& \210\306\334\335\336\312\337\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.\nUse of `executable-prefix-env' is preferable to this option." :version "26.1" string executable-prefix-env "If non-nil, use \"/usr/bin/env\" in interpreter magic number.\nIf this variable is non-nil, the interpreter magic number inserted\nby `executable-set-magic' will be \"#!/usr/bin/env INTERPRETER\",\notherwise it will be \"#!/path/to/INTERPRETER\"." 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) (byte-code "\300\301\302\303\304\305\306\307&\210\310\301\311\312\313$\207" [custom-declare-variable executable-self-display "tail" "Command you use with argument `-n+2' to make text files self-display.\nNote that the like of `more' doesn't work too well under Emacs \\[shell]." :type string :group executable make-obsolete-variable nil "25.1" set] 8) #@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)) (#$ . 2772)) #@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)) (#$ . 3021)) (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) "\305!\306 \307\310#@\311\312!rq\210\313\216\314\f\206 \315\307p\307 \316\n\317\320& \210eb\210\321\n\307\322#\2052 \322-\207" [data-directory dir file #1=#:temp-buffer program file-truename directory-files nil "\\`[^.]" generate-new-buffer " *temp*" #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] call-process "find" "-name" "-maxdepth" "1" search-forward t] 10 (#$ . 3558)]) #@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 "\205\"