(defun xterm (&optional args)
  "Start an independent xterm window with optional argument string ARGS.
See also  xterm-process  which starts an xterm and runs a command."
  (interactive "sXterm arguments [default=none]: ")
  (call-process "/bin/sh" nil 0 nil
		"-c"
		(concat "xterm "
			(if args args ""))))

(defun xterm-process (command-line &optional xterm-args destruct-delay
				   shell-args alternate-shell)
  "Executes COMMAND-LINE in a shell in an independent xterm.
The shell is specified by emacs's  shell-file-name .
The xterm is started with an optional argument string XTERM-ARGS.
After the command exits, xterm waits DESTRUCT-DELAY seconds before exiting.
The shell can be given optional SHELL-ARGS,
and can be specified by ALTERNATE-SHELL rather than by  shell-file-name .
See  xterm , which starts an xterm, but doesnt run a command."
  (interactive "sWhat command should be run in xterm?: 
sAny xterm arguments? [defualt=none]: 
sAfter finishing command, keep xterm up for how many seconds?[default=3]: ")
  (call-process "/bin/sh" nil 0 nil
		"-c"
		(concat "xterm "
			(if (or (not xterm-args) ; non-interactive not given
				(equal xterm-args "")) ; interactive not given
			    ""
			  xterm-args)
			" -e "
			;; Shell
			(if (or (not alternate-shell)
					; "" check not realy needed
					; till alt-shell made interactive.
				(equal alternate-shell ""))
			    shell-file-name
			  alternate-shell)
			" "
			;; Shell args
			(if (or (not shell-args)
					; "" check not yet needed.
				(equal shell-args "")) 
			    ""
			  shell-args)
			"-c \""
			command-line
			";sleep "
			(if (or (not destruct-delay)
				(equal destruct-delay ""))
			    "3"
			  destruct-delay)
			"\"")))





