changeset 30902:ffe3b5100238

Add compatibility definition of comint-line-beginning-position.
author Miles Bader <miles@gnu.org>
date Thu, 17 Aug 2000 06:22:46 +0000
parents 25ba383947b5
children 59377e17d327
files lisp/progmodes/octave-inf.el
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/octave-inf.el	Thu Aug 17 06:11:09 2000 +0000
+++ b/lisp/progmodes/octave-inf.el	Thu Aug 17 06:22:46 2000 +0000
@@ -93,6 +93,17 @@
   ;; 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)