changeset 30838:c9f793802722

Add compatibility definition of comint-line-beginning-position.
author Miles Bader <miles@gnu.org>
date Wed, 16 Aug 2000 02:33:25 +0000
parents b6b7264277b5
children bf46e8c28608
files lisp/progmodes/sql.el
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/sql.el	Wed Aug 16 01:38:49 2000 +0000
+++ b/lisp/progmodes/sql.el	Wed Aug 16 02:33:25 2000 +0000
@@ -654,6 +654,17 @@
 can be changed by some entry functions to provide more hilighting.")
 
 
+;;; 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))))
+
+
 
 ;;; Small functions