Function: idlwave-shell
idlwave-shell is an autoloaded, interactive and byte-compiled function
defined in idlw-shell.el.gz.
Signature
(idlwave-shell &optional ARG)
Documentation
Run an inferior IDL, with I/O through buffer (idlwave-shell-buffer).
If buffer exists but shell process is not running, start new IDL. If buffer exists and shell process is running, just switch to the buffer.
When called with a prefix ARG, or when idlwave-shell-use-dedicated-frame
is non-nil, the shell buffer and the source buffers will be in
separate frames.
The command to run comes from variable idlwave-shell-explicit-file-name,
with options taken from idlwave-shell-command-line-options.
The buffer is put in idlwave-shell-mode, providing commands for sending
input and controlling the IDL job. See help on idlwave-shell-mode.
See also the variable idlwave-shell-prompt-pattern.
(Type C-h m (describe-mode) in the shell buffer for a list of commands.)
Key Bindings
Aliases
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/idlw-shell.el.gz
;;;###autoload
(defun idlwave-shell (&optional arg)
"Run an inferior IDL, with I/O through buffer `(idlwave-shell-buffer)'.
If buffer exists but shell process is not running, start new IDL.
If buffer exists and shell process is running, just switch to the buffer.
When called with a prefix ARG, or when `idlwave-shell-use-dedicated-frame'
is non-nil, the shell buffer and the source buffers will be in
separate frames.
The command to run comes from variable `idlwave-shell-explicit-file-name',
with options taken from `idlwave-shell-command-line-options'.
The buffer is put in `idlwave-shell-mode', providing commands for sending
input and controlling the IDL job. See help on `idlwave-shell-mode'.
See also the variable `idlwave-shell-prompt-pattern'.
\(Type \\[describe-mode] in the shell buffer for a list of commands.)"
(interactive "P")
(if (eq arg 'quick)
(progn
(let ((idlwave-shell-use-dedicated-frame nil))
(idlwave-shell nil)
(delete-other-windows))
(and idlwave-shell-use-dedicated-frame
(setq idlwave-shell-idl-wframe (selected-frame)))
(add-hook 'idlwave-shell-sentinel-hook
#'save-buffers-kill-emacs t))
;; A non-nil arg means, we want a dedicated frame. This will last
;; for the current editing session.
(if arg (setq idlwave-shell-use-dedicated-frame t))
(if (equal arg '(16)) (setq idlwave-shell-use-dedicated-frame nil))
;; Check if the process still exists. If not, create it.
(unless (comint-check-proc (idlwave-shell-buffer))
(let* ((prg (or idlwave-shell-explicit-file-name "idl"))
(buf (apply #'make-comint
idlwave-shell-process-name prg nil
(if (stringp idlwave-shell-command-line-options)
(idlwave-split-string
idlwave-shell-command-line-options)
idlwave-shell-command-line-options)))
(process (get-buffer-process buf)))
(setq idlwave-idlwave_routine_info-compiled nil)
(set-process-filter process #'idlwave-shell-filter)
(set-process-sentinel process #'idlwave-shell-sentinel)
(set-buffer buf)
(idlwave-shell-mode)))
(let ((window (idlwave-display-buffer (idlwave-shell-buffer) nil
(idlwave-shell-shell-frame)))
(current-window (selected-window)))
(select-window window)
(goto-char (point-max))
(if idlwave-shell-use-dedicated-window
(set-window-dedicated-p window t))
(select-window current-window)
(if idlwave-shell-ready
(raise-frame (window-frame window)))
(if (eq (selected-frame) (window-frame window))
(select-window window))))
;; Save the paths at the end, if they are from the Shell and new.
(add-hook 'idlwave-shell-sentinel-hook
(lambda ()
(if (and
idlwave-auto-write-paths
idlwave-path-alist
(not idlwave-library-path)
(get 'idlwave-path-alist 'from-shell))
(idlwave-write-paths)))))