Function: octave-send-region

octave-send-region is an interactive and byte-compiled function defined in octave.el.gz.

Signature

(octave-send-region BEG END)

Documentation

Send current region to the inferior Octave process.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/octave.el.gz
(defun octave-send-region (beg end)
  "Send current region to the inferior Octave process."
  (interactive "r")
  (inferior-octave t)
  (let ((proc inferior-octave-process)
        (string (buffer-substring-no-properties beg end)))
    (with-current-buffer inferior-octave-buffer
      ;; https://lists.gnu.org/r/emacs-devel/2013-10/msg00095.html
      (compilation-forget-errors)
      (insert-before-markers string "\n")
      (comint-send-string proc (concat string "\n")))
    (deactivate-mark))
  (if octave-send-show-buffer
      (display-buffer inferior-octave-buffer)))