From 5147fc177367a3d41a98bc651b02af3660aeafbd Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=BCdiger=20Sonderfeld?= Date: Tue, 30 Apr 2013 23:20:46 +0800 Subject: [PATCH] * progmodes/octave.el (inferior-octave-prompt-read-only): New user variable. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/octave.el | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5ff660592b7..00cfe320701 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-04-30 Rüdiger Sonderfeld + + * progmodes/octave.el (inferior-octave-prompt-read-only): New user + variable. + 2013-04-30 Leo Liu * progmodes/octave.el (octave-variables): Remove. No builtin diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 6913d70550f..32d265d2e80 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -568,6 +568,15 @@ definitions can also be stored in files and used in batch mode." :type 'regexp :group 'octave) +(defcustom inferior-octave-prompt-read-only t + "If non-nil, the Octave prompt is read only. +The read only region includes the newline before the prompt. +Setting this variable does not affect existing Octave runs. +This feature utilizes the `comint-prompt-read-only' variable." + :type 'boolean + :group 'octave + :version "24.4") + (defcustom inferior-octave-startup-file nil "Name of the inferior Octave startup file. The contents of this file are sent to the inferior Octave process on @@ -661,6 +670,7 @@ in the Inferior Octave buffer.") comint-input-ring-size (or (getenv "OCTAVE_HISTSIZE") 1024)) (setq-local comint-dynamic-complete-functions inferior-octave-dynamic-complete-functions) + (setq-local comint-prompt-read-only inferior-octave-prompt-read-only) (add-hook 'comint-input-filter-functions 'inferior-octave-directory-tracker nil t) (comint-read-input-ring t)) -- 2.39.2