[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115173: * progmodes/octave.el (octave-mode-map, oct
From: |
Leo Liu |
Subject: |
[Emacs-diffs] trunk r115173: * progmodes/octave.el (octave-mode-map, octave-mode-menu): Add |
Date: |
Thu, 21 Nov 2013 17:19:14 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115173
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15935
author: RĂ¼diger Sonderfeld <address@hidden>
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Fri 2013-11-22 01:18:25 +0800
message:
* progmodes/octave.el (octave-mode-map, octave-mode-menu): Add
`octave-source-file'.
(octave-source-file): New function.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/octave.el
octavemod.el-20091113204419-o5vbwnq5f7feedwu-1028
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-11-21 16:41:35 +0000
+++ b/lisp/ChangeLog 2013-11-21 17:18:25 +0000
@@ -1,3 +1,9 @@
+2013-11-21 RĂ¼diger Sonderfeld <address@hidden>
+
+ * 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 <address@hidden> (tiny change)
* net/eww.el (eww-local-regex): New variable.
=== modified file 'lisp/progmodes/octave.el'
--- a/lisp/progmodes/octave.el 2013-10-25 00:52:26 +0000
+++ b/lisp/progmodes/octave.el 2013-11-21 17:18:25 +0000
@@ -110,6 +110,7 @@
(define-key map "\C-c;" 'octave-update-function-file-comment)
(define-key map "\C-hd" 'octave-help)
(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-il" 'octave-send-line)
(define-key map "\C-c\C-ib" 'octave-send-block)
@@ -174,6 +175,7 @@
["Send Current Function" octave-send-defun t]
["Send Region" octave-send-region t]
["Send Buffer" octave-send-buffer t]
+ ["Source Current File" octave-source-file t]
["Show Process Buffer" octave-show-process-buffer t]
["Hide Process Buffer" octave-hide-process-buffer t]
["Kill Process" octave-kill-process t])
@@ -1463,6 +1465,19 @@
(delete-windows-on 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)
"Send current region to the inferior Octave process."
(interactive "r")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115173: * progmodes/octave.el (octave-mode-map, octave-mode-menu): Add,
Leo Liu <=