summaryrefslogtreecommitdiff
path: root/lisp/progmodes/sql.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2000-08-16 02:34:28 +0000
committerMiles Bader <miles@gnu.org>2000-08-16 02:34:28 +0000
commit04231ab822f5ff597aac5c99b8277bbc36b24813 (patch)
tree506d595585275efffb6bebcd3e82c64497290674 /lisp/progmodes/sql.el
parent4d5d6aabc3baaa3ecfd6982d6e19d2797e020dd4 (diff)
downloademacs-04231ab822f5ff597aac5c99b8277bbc36b24813.tar.gz
Add compatibility definition of comint-line-beginning-position.
Diffstat (limited to 'lisp/progmodes/sql.el')
-rw-r--r--lisp/progmodes/sql.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 8cfd0278f3c..2a50422abf6 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -654,6 +654,17 @@ used for the default `font-lock-defaults' value in `sql-mode'. This
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