aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorRichard M. Stallman1997-04-13 02:39:56 +0000
committerRichard M. Stallman1997-04-13 02:39:56 +0000
commited366e8726109aaabd7b0e44d59b3e434b70ca9a (patch)
treefe7056041f463caaf2fe6d80ba01c3546db92800 /lisp/shell.el
parent4d100a01c9dadb3e604bff2b94650e92b3397fc7 (diff)
downloademacs-ed366e8726109aaabd7b0e44d59b3e434b70ca9a.tar.gz
emacs-ed366e8726109aaabd7b0e44d59b3e434b70ca9a.zip
Add defgroup's; use defcustom for user vars.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el99
1 files changed, 70 insertions, 29 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 97e9589be27..690ff34fc2c 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -1,6 +1,6 @@
1;;; shell.el --- specialized comint.el for running the shell. 1;;; shell.el --- specialized comint.el for running the shell.
2 2
3;; Copyright (C) 1988, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. 3;; Copyright (C) 1988, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
4 4
5;; Author: Olin Shivers <shivers@cs.cmu.edu> 5;; Author: Olin Shivers <shivers@cs.cmu.edu>
6;; Maintainer: Simon Marshall <simon@gnu.ai.mit.edu> 6;; Maintainer: Simon Marshall <simon@gnu.ai.mit.edu>
@@ -106,6 +106,19 @@
106 106
107;;; Customization and Buffer Variables 107;;; Customization and Buffer Variables
108 108
109(defgroup shell nil
110 "Running shell from within Emacs buffers"
111 :group 'processes
112 :group 'unix)
113
114(defgroup shell-directories nil
115 "Directory support in shell mode"
116 :group 'shell)
117
118(defgroup shell-faces nil
119 "Faces in shell buffers"
120 :group 'shell)
121
109;;;###autoload 122;;;###autoload
110(defvar shell-prompt-pattern "^[^#$%>\n]*[#$%>] *" 123(defvar shell-prompt-pattern "^[^#$%>\n]*[#$%>] *"
111 "Regexp to match prompts in the inferior shell. 124 "Regexp to match prompts in the inferior shell.
@@ -119,13 +132,15 @@ on lines which don't start with a prompt.
119 132
120This is a fine thing to set in your `.emacs' file.") 133This is a fine thing to set in your `.emacs' file.")
121 134
122(defvar shell-completion-fignore nil 135(defcustom shell-completion-fignore nil
123 "*List of suffixes to be disregarded during file/command completion. 136 "*List of suffixes to be disregarded during file/command completion.
124This variable is used to initialize `comint-completion-fignore' in the shell 137This variable is used to initialize `comint-completion-fignore' in the shell
125buffer. The default is nil, for compatibility with most shells. 138buffer. The default is nil, for compatibility with most shells.
126Some people like (\"~\" \"#\" \"%\"). 139Some people like (\"~\" \"#\" \"%\").
127 140
128This is a fine thing to set in your `.emacs' file.") 141This is a fine thing to set in your `.emacs' file."
142 :type '(repeat (string :tag "Suffix"))
143 :group 'shell)
129 144
130(defvar shell-delimiter-argument-list '(?\| ?& ?< ?> ?\( ?\) ?\;) 145(defvar shell-delimiter-argument-list '(?\| ?& ?< ?> ?\( ?\) ?\;)
131 "List of characters to recognise as separate arguments. 146 "List of characters to recognise as separate arguments.
@@ -166,57 +181,79 @@ shell buffer.
166 181
167This is a fine thing to set in your `.emacs' file.") 182This is a fine thing to set in your `.emacs' file.")
168 183
169(defvar shell-command-regexp "[^;&|\n]+" 184(defcustom shell-command-regexp "[^;&|\n]+"
170 "*Regexp to match a single command within a pipeline. 185 "*Regexp to match a single command within a pipeline.
171This is used for directory tracking and does not do a perfect job.") 186This is used for directory tracking and does not do a perfect job."
187 :type 'regexp
188 :group 'shell)
172 189
173(defvar shell-completion-execonly t 190(defcustom shell-completion-execonly t
174 "*If non-nil, use executable files only for completion candidates. 191 "*If non-nil, use executable files only for completion candidates.
175This mirrors the optional behavior of tcsh. 192This mirrors the optional behavior of tcsh.
176 193
177Detecting executability of files may slow command completion considerably.") 194Detecting executability of files may slow command completion considerably."
195 :type 'boolean
196 :group 'shell)
178 197
179(defvar shell-popd-regexp "popd" 198(defcustom shell-popd-regexp "popd"
180 "*Regexp to match subshell commands equivalent to popd.") 199 "*Regexp to match subshell commands equivalent to popd."
200 :type 'regexp
201 :group 'shell-directories)
181 202
182(defvar shell-pushd-regexp "pushd" 203(defcustom shell-pushd-regexp "pushd"
183 "*Regexp to match subshell commands equivalent to pushd.") 204 "*Regexp to match subshell commands equivalent to pushd."
205 :type 'regexp
206 :group 'shell-directories)
184 207
185(defvar shell-pushd-tohome nil 208(defcustom shell-pushd-tohome nil
186 "*If non-nil, make pushd with no arg behave as \"pushd ~\" (like cd). 209 "*If non-nil, make pushd with no arg behave as \"pushd ~\" (like cd).
187This mirrors the optional behavior of tcsh.") 210This mirrors the optional behavior of tcsh."
211 :type 'boolean
212 :group 'shell-directories)
188 213
189(defvar shell-pushd-dextract nil 214(defcustom shell-pushd-dextract nil
190 "*If non-nil, make \"pushd +n\" pop the nth dir to the stack top. 215 "*If non-nil, make \"pushd +n\" pop the nth dir to the stack top.
191This mirrors the optional behavior of tcsh.") 216This mirrors the optional behavior of tcsh."
217 :type 'boolean
218 :group 'shell-directories)
192 219
193(defvar shell-pushd-dunique nil 220(defcustom shell-pushd-dunique nil
194 "*If non-nil, make pushd only add unique directories to the stack. 221 "*If non-nil, make pushd only add unique directories to the stack.
195This mirrors the optional behavior of tcsh.") 222This mirrors the optional behavior of tcsh."
223 :type 'boolean
224 :group 'shell-directories)
196 225
197(defvar shell-cd-regexp "cd" 226(defcustom shell-cd-regexp "cd"
198 "*Regexp to match subshell commands equivalent to cd.") 227 "*Regexp to match subshell commands equivalent to cd."
228 :type 'regexp
229 :group 'shell-directories)
199 230
200(defvar shell-chdrive-regexp 231(defcustom shell-chdrive-regexp
201 (if (memq system-type '(ms-dos windows-nt)) 232 (if (memq system-type '(ms-dos windows-nt))
202 ; NetWare allows the five chars between upper and lower alphabetics. 233 ; NetWare allows the five chars between upper and lower alphabetics.
203 "[]a-zA-Z^_`\\[\\\\]:" 234 "[]a-zA-Z^_`\\[\\\\]:"
204 nil) 235 nil)
205 "*If non-nil, is regexp used to track drive changes.") 236 "*If non-nil, is regexp used to track drive changes."
237 :type 'regexp
238 :group 'shell-directories)
206 239
207(defvar explicit-shell-file-name nil 240(defcustom explicit-shell-file-name nil
208 "*If non-nil, is file name to use for explicitly requested inferior shell.") 241 "*If non-nil, is file name to use for explicitly requested inferior shell."
242 :type '(choice (const :tag "None" nil) file)
243 :group 'shell)
209 244
210(defvar explicit-csh-args 245(defcustom explicit-csh-args
211 (if (eq system-type 'hpux) 246 (if (eq system-type 'hpux)
212 ;; -T persuades HP's csh not to think it is smarter 247 ;; -T persuades HP's csh not to think it is smarter
213 ;; than us about what terminal modes to use. 248 ;; than us about what terminal modes to use.
214 '("-i" "-T") 249 '("-i" "-T")
215 '("-i")) 250 '("-i"))
216 "*Args passed to inferior shell by M-x shell, if the shell is csh. 251 "*Args passed to inferior shell by M-x shell, if the shell is csh.
217Value is a list of strings, which may be nil.") 252Value is a list of strings, which may be nil."
253 :type '(repeat (string :tag "Argument"))
254 :group 'shell)
218 255
219(defvar shell-input-autoexpand 'history 256(defcustom shell-input-autoexpand 'history
220 "*If non-nil, expand input command history references on completion. 257 "*If non-nil, expand input command history references on completion.
221This mirrors the optional behavior of tcsh (its autoexpand and histlit). 258This mirrors the optional behavior of tcsh (its autoexpand and histlit).
222 259
@@ -226,7 +263,9 @@ into the buffer's input ring. See also `comint-magic-space' and
226`comint-dynamic-complete'. 263`comint-dynamic-complete'.
227 264
228This variable supplies a default for `comint-input-autoexpand', 265This variable supplies a default for `comint-input-autoexpand',
229for Shell mode only.") 266for Shell mode only."
267 :type '(choice (const nil) (const input) (const history))
268 :type 'shell)
230 269
231(defvar shell-dirstack nil 270(defvar shell-dirstack nil
232 "List of directories saved by pushd in this buffer's shell. 271 "List of directories saved by pushd in this buffer's shell.
@@ -260,8 +299,10 @@ Thus, this does not include the shell's current directory.")
260 shell-replace-by-expanded-directory) 299 shell-replace-by-expanded-directory)
261 'complete-expand))) 300 'complete-expand)))
262 301
263(defvar shell-mode-hook '() 302(defcustom shell-mode-hook '()
264 "*Hook for customising Shell mode.") 303 "*Hook for customising Shell mode."
304 :type 'hook
305 :group 'shell)
265 306
266(defvar shell-font-lock-keywords 307(defvar shell-font-lock-keywords
267 (list (cons shell-prompt-pattern 'font-lock-keyword-face) 308 (list (cons shell-prompt-pattern 'font-lock-keyword-face)