Mercurial > emacs
diff lisp/progmodes/executable.el @ 17411:f0ff96a35eb8
Add defgroup's; use defcustom for user vars.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sat, 12 Apr 1997 03:18:33 +0000 |
| parents | 7af77f490166 |
| children | 727cf56647a4 |
line wrap: on
line diff
--- a/lisp/progmodes/executable.el Sat Apr 12 03:14:16 1997 +0000 +++ b/lisp/progmodes/executable.el Sat Apr 12 03:18:33 1997 +0000 @@ -52,39 +52,59 @@ ;;; Code: -(defvar executable-insert t +(defgroup executable nil + "Base functionality for executable interpreter scripts" + :group 'processes) + +(defcustom executable-insert 'other "*Non-nil means offer to add a magic number to a file. This takes effect when you switch to certain major modes, including Shell-script mode (`sh-mode'). When you type \\[executable-set-magic], it always offers to add or -update the magic number.") - -(defvar executable-query 'function - "*If non-nil, ask user before changing an existing magic number. -When this is `function', only ask when called non-interactively.") +update the magic number." + :type '(choice (const :tag "off" nil) + (const :tag "on" t) + symbol) + :group 'executable) -(defvar 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.") +(defcustom executable-query 'function + "*If non-nil, ask user before changing an existing magic number. +When this is `function', only ask when called non-interactively." + :type '(choice (const :tag "Don't Ask" nil) + (const :tag "Ask" t) + (const :tag "Ask when non-interactive" function)) + :group 'executable) -(defvar executable-prefix "#! " - "*Interpreter magic number prefix inserted when there was no magic number.") +(defcustom 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." + :type 'regexp + :group 'executable) +(defcustom executable-prefix "#! " + "*Interpreter magic number prefix inserted when there was no magic number." + :type 'string + :group 'executable) -(defvar executable-chmod 73 + +(defcustom executable-chmod 73 "*After saving, if the file is not executable, set this mode. This mode passed to `set-file-modes' is taken absolutely when negative, or relative to the files existing modes. Do nothing if this is nil. -Typical values are 73 (+x) or -493 (rwxr-xr-x).") +Typical values are 73 (+x) or -493 (rwxr-xr-x)." + :type 'integer + :group 'executable) (defvar executable-command nil) -(defvar executable-self-display "tail" +(defcustom executable-self-display "tail" "*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].") +Note that the like of `more' doesn't work too well under Emacs \\[shell]." + :type 'string + :group 'executable) (defvar executable-font-lock-keywords
