diff options
| author | Yuuki Harano | 2021-02-20 18:00:36 +0900 |
|---|---|---|
| committer | Yuuki Harano | 2021-02-20 18:00:36 +0900 |
| commit | be2e47362b0f933dbc8e300e3d168296b7e2aac4 (patch) | |
| tree | 3b14e2e66d33566b81cb1d6e8bb04551d95dd2b9 /lisp/progmodes/executable.el | |
| parent | 949d3e50ec4ea7723bf14b93b66ad0b72f96f163 (diff) | |
| parent | c85c8e7d42ae2a5fc95fa7b14257389d8383b34d (diff) | |
| download | emacs-be2e47362b0f933dbc8e300e3d168296b7e2aac4.tar.gz emacs-be2e47362b0f933dbc8e300e3d168296b7e2aac4.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'lisp/progmodes/executable.el')
| -rw-r--r-- | lisp/progmodes/executable.el | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index fa5724a3800..85e9b4bb882 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el | |||
| @@ -54,41 +54,31 @@ | |||
| 54 | "Base functionality for executable interpreter scripts." | 54 | "Base functionality for executable interpreter scripts." |
| 55 | :group 'processes) | 55 | :group 'processes) |
| 56 | 56 | ||
| 57 | ;; This used to default to `other', but that doesn't seem to have any | 57 | (defcustom executable-insert t |
| 58 | ;; significance. fx 2000-02-11. | ||
| 59 | (defcustom executable-insert t ; 'other | ||
| 60 | "Non-nil means offer to add a magic number to a file. | 58 | "Non-nil means offer to add a magic number to a file. |
| 61 | This takes effect when you switch to certain major modes, | 59 | This takes effect when you switch to certain major modes, |
| 62 | including Shell-script mode (`sh-mode'). | 60 | including Shell-script mode (`sh-mode'). |
| 63 | When you type \\[executable-set-magic], it always offers to add or | 61 | When you type \\[executable-set-magic], it always offers to add or |
| 64 | update the magic number." | 62 | update the magic number." |
| 65 | ;;; :type '(choice (const :tag "off" nil) | 63 | :type 'boolean) |
| 66 | ;;; (const :tag "on" t) | ||
| 67 | ;;; symbol) | ||
| 68 | :type 'boolean | ||
| 69 | :group 'executable) | ||
| 70 | |||
| 71 | 64 | ||
| 72 | (defcustom executable-query 'function | 65 | (defcustom executable-query 'function |
| 73 | "If non-nil, ask user before changing an existing magic number. | 66 | "If non-nil, ask user before changing an existing magic number. |
| 74 | When this is `function', only ask when called non-interactively." | 67 | When this is `function', only ask when called non-interactively." |
| 75 | :type '(choice (const :tag "Don't Ask" nil) | 68 | :type '(choice (const :tag "Don't Ask" nil) |
| 76 | (const :tag "Ask when non-interactive" function) | 69 | (const :tag "Ask when non-interactive" function) |
| 77 | (other :tag "Ask" t)) | 70 | (other :tag "Ask" t))) |
| 78 | :group 'executable) | ||
| 79 | 71 | ||
| 80 | 72 | ||
| 81 | (defcustom executable-magicless-file-regexp "/[Mm]akefile$\\|/\\.\\(z?profile\\|bash_profile\\|z?login\\|bash_login\\|z?logout\\|bash_logout\\|.+shrc\\|esrc\\|rcrc\\|[kz]shenv\\)$" | 73 | (defcustom executable-magicless-file-regexp "/[Mm]akefile$\\|/\\.\\(z?profile\\|bash_profile\\|z?login\\|bash_login\\|z?logout\\|bash_logout\\|.+shrc\\|esrc\\|rcrc\\|[kz]shenv\\)$" |
| 82 | "On files with this kind of name no magic is inserted or changed." | 74 | "On files with this kind of name no magic is inserted or changed." |
| 83 | :type 'regexp | 75 | :type 'regexp) |
| 84 | :group 'executable) | ||
| 85 | 76 | ||
| 86 | (defcustom executable-prefix "#!" | 77 | (defcustom executable-prefix "#!" |
| 87 | "Interpreter magic number prefix inserted when there was no magic number. | 78 | "Interpreter magic number prefix inserted when there was no magic number. |
| 88 | Use of `executable-prefix-env' is preferable to this option." | 79 | Use of `executable-prefix-env' is preferable to this option." |
| 89 | :version "26.1" ; deprecated | 80 | :version "26.1" ; deprecated |
| 90 | :type 'string | 81 | :type 'string) |
| 91 | :group 'executable) | ||
| 92 | 82 | ||
| 93 | (defcustom executable-prefix-env nil | 83 | (defcustom executable-prefix-env nil |
| 94 | "If non-nil, use \"/usr/bin/env\" in interpreter magic number. | 84 | "If non-nil, use \"/usr/bin/env\" in interpreter magic number. |
| @@ -96,8 +86,7 @@ If this variable is non-nil, the interpreter magic number inserted | |||
| 96 | by `executable-set-magic' will be \"#!/usr/bin/env INTERPRETER\", | 86 | by `executable-set-magic' will be \"#!/usr/bin/env INTERPRETER\", |
| 97 | otherwise it will be \"#!/path/to/INTERPRETER\"." | 87 | otherwise it will be \"#!/path/to/INTERPRETER\"." |
| 98 | :version "26.1" | 88 | :version "26.1" |
| 99 | :type 'boolean | 89 | :type 'boolean) |
| 100 | :group 'executable) | ||
| 101 | 90 | ||
| 102 | (defcustom executable-chmod 73 | 91 | (defcustom executable-chmod 73 |
| 103 | "After saving, if the file is not executable, set this mode. | 92 | "After saving, if the file is not executable, set this mode. |
| @@ -105,8 +94,7 @@ This mode passed to `set-file-modes' is taken absolutely when negative, or | |||
| 105 | relative to the files existing modes. Do nothing if this is nil. | 94 | relative to the files existing modes. Do nothing if this is nil. |
| 106 | Typical values are 73 (+x) or -493 (rwxr-xr-x)." | 95 | Typical values are 73 (+x) or -493 (rwxr-xr-x)." |
| 107 | :type '(choice integer | 96 | :type '(choice integer |
| 108 | (const nil)) | 97 | (const nil))) |
| 109 | :group 'executable) | ||
| 110 | 98 | ||
| 111 | 99 | ||
| 112 | (defvar executable-command nil) | 100 | (defvar executable-command nil) |
| @@ -114,8 +102,7 @@ Typical values are 73 (+x) or -493 (rwxr-xr-x)." | |||
| 114 | (defcustom executable-self-display "tail" | 102 | (defcustom executable-self-display "tail" |
| 115 | "Command you use with argument `-n+2' to make text files self-display. | 103 | "Command you use with argument `-n+2' to make text files self-display. |
| 116 | Note that the like of `more' doesn't work too well under Emacs \\[shell]." | 104 | Note that the like of `more' doesn't work too well under Emacs \\[shell]." |
| 117 | :type 'string | 105 | :type 'string) |
| 118 | :group 'executable) | ||
| 119 | 106 | ||
| 120 | (make-obsolete-variable 'executable-self-display nil "25.1" 'set) | 107 | (make-obsolete-variable 'executable-self-display nil "25.1" 'set) |
| 121 | 108 | ||