From 9d245da59e738ffb9e13b801b4d01d5635c07ea7 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 17 Aug 2000 06:25:11 +0000 Subject: [PATCH] Add compatibility definition of comint-line-beginning-position. --- lisp/ChangeLog | 7 ++++++- lisp/progmodes/octave-inf.el | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1bed7c58ac5..3a795dbcf90 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-08-17 Miles Bader + + * progmodes/octave-inf.el: Add compatibility definition of + comint-line-beginning-position. + 2000-08-17 Kenichi Handa * startup.el (normal-top-level): Look in each dir in load-path for @@ -102,7 +107,7 @@ 2000-08-16 Miles Bader - * progmodes/sql.el: Add compatibility definition onf + * progmodes/sql.el: Add compatibility definition of comint-line-beginning-position. 2000-08-15 Gerd Moellmann diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index 0dd6bf99eb9..dd26918e4e2 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -93,6 +93,17 @@ mode, set this to (\"-q\" \"--traditional\")." ;; Could certainly do more font locking in inferior Octave ... "Additional expressions to highlight in Inferior Octave mode.") + +;;; Compatibility functions +(if (not (fboundp 'comint-line-beginning-position)) + ;; comint-line-beginning-position is defined in Emacs 21 + (defun comint-line-beginning-position () + "Returns the buffer position of the beginning of the line, after any prompt. +The prompt is assumed to be any text at the beginning of the line matching +the regular expression `comint-prompt-regexp', a buffer local variable." + (save-excursion (comint-bol nil) (point)))) + + (defvar inferior-octave-output-list nil) (defvar inferior-octave-output-string nil) (defvar inferior-octave-receive-in-progress nil) -- 2.39.2