Function: octave-source-file

octave-source-file is an interactive and byte-compiled function defined in octave.el.gz.

Signature

(octave-source-file FILE)

Documentation

Execute FILE in the inferior Octave process.

This is done using Octave's source function. FILE defaults to current buffer file unless called with a prefix arg C-u (universal-argument).

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/octave.el.gz
(defun octave-source-file (file)
  "Execute FILE in the inferior Octave process.
This is done using Octave's source function.  FILE defaults to
current buffer file unless called with a prefix arg \\[universal-argument]."
  (interactive (list (or (and (not current-prefix-arg) buffer-file-name)
                         (read-file-name "File: " nil nil t))))
  (or (stringp file)
      (signal 'wrong-type-argument (list 'stringp file)))
  (inferior-octave t)
  (with-current-buffer inferior-octave-buffer
    (comint-send-string inferior-octave-process
                        (format "source '%s'\n" file))))