Commit 06e752b4 authored by Rüdiger Sonderfeld's avatar Rüdiger Sonderfeld Committed by Leo Liu
Browse files

* progmodes/octave.el (octave-mode-map, octave-mode-menu): Add

`octave-source-file'.
(octave-source-file): New function.

Fixes: debbugs:15935
parent 604ede6c
2013-11-21 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
* progmodes/octave.el (octave-mode-map, octave-mode-menu): Add
`octave-source-file'.
(octave-source-file): New function. (Bug#15935)
2013-11-21 Kenjiro Nakayama <nakayamakenjiro@gmail.com> (tiny change) 2013-11-21 Kenjiro Nakayama <nakayamakenjiro@gmail.com> (tiny change)
* net/eww.el (eww-local-regex): New variable. * net/eww.el (eww-local-regex): New variable.
......
...@@ -110,6 +110,7 @@ parenthetical grouping.") ...@@ -110,6 +110,7 @@ parenthetical grouping.")
(define-key map "\C-c;" 'octave-update-function-file-comment) (define-key map "\C-c;" 'octave-update-function-file-comment)
(define-key map "\C-hd" 'octave-help) (define-key map "\C-hd" 'octave-help)
(define-key map "\C-ha" 'octave-lookfor) (define-key map "\C-ha" 'octave-lookfor)
(define-key map "\C-c\C-l" 'octave-source-file)
(define-key map "\C-c\C-f" 'octave-insert-defun) (define-key map "\C-c\C-f" 'octave-insert-defun)
(define-key map "\C-c\C-il" 'octave-send-line) (define-key map "\C-c\C-il" 'octave-send-line)
(define-key map "\C-c\C-ib" 'octave-send-block) (define-key map "\C-c\C-ib" 'octave-send-block)
...@@ -174,6 +175,7 @@ parenthetical grouping.") ...@@ -174,6 +175,7 @@ parenthetical grouping.")
["Send Current Function" octave-send-defun t] ["Send Current Function" octave-send-defun t]
["Send Region" octave-send-region t] ["Send Region" octave-send-region t]
["Send Buffer" octave-send-buffer t] ["Send Buffer" octave-send-buffer t]
["Source Current File" octave-source-file t]
["Show Process Buffer" octave-show-process-buffer t] ["Show Process Buffer" octave-show-process-buffer t]
["Hide Process Buffer" octave-hide-process-buffer t] ["Hide Process Buffer" octave-hide-process-buffer t]
["Kill Process" octave-kill-process t]) ["Kill Process" octave-kill-process t])
...@@ -1463,6 +1465,19 @@ entered without parens)." ...@@ -1463,6 +1465,19 @@ entered without parens)."
(delete-windows-on inferior-octave-buffer) (delete-windows-on inferior-octave-buffer)
(message "No buffer named %s" inferior-octave-buffer))) (message "No buffer named %s" inferior-octave-buffer)))
(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))))
(defun octave-send-region (beg end) (defun octave-send-region (beg end)
"Send current region to the inferior Octave process." "Send current region to the inferior Octave process."
(interactive "r") (interactive "r")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment