Function: ps-run-start

ps-run-start is an interactive and byte-compiled function defined in ps-mode.el.gz.

Signature

(ps-run-start)

Documentation

Start interactive PostScript.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ps-mode.el.gz
(defun ps-run-start ()
  "Start interactive PostScript."
  (interactive)
  (let ((command (or (and window-system ps-run-x) ps-run-dumb))
	(init-file nil)
	(process-connection-type nil)
	(oldwin (selected-window)))
    (unless command
      (error "No command specified to run interactive PostScript"))
    (unless (and ps-run-mark (markerp ps-run-mark))
      (setq ps-run-mark (make-marker)))
    (when ps-run-init
      (setq init-file (ps-run-make-tmp-filename))
      (write-region (concat ps-run-init "\n") 0 init-file)
      (setq init-file (list init-file)))
    (pop-to-buffer "*ps-run*")
    (ps-run-mode)
    (when (process-status "ps-run")
      (delete-process "ps-run"))
    (erase-buffer)
    (setq command (append command init-file))
    (insert (mapconcat #'identity command " ") "\n")
    (apply #'make-comint "ps-run" (car command) nil (cdr command))
    (with-current-buffer "*ps-run*"
      (use-local-map ps-run-mode-map)
      (setq-local comint-prompt-regexp ps-run-prompt))
    (select-window oldwin)))