aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/sql.el11
2 files changed, 16 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 62defa4c9d..052a30dd92 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-16 Miles Bader <[email protected]>
+
+ * progmodes/sql.el: Add compatibility definition onf
+ comint-line-beginning-position.
+
2000-08-15 Gerd Moellmann <[email protected]>
* buff-menu.el (list-buffers-noselect): Set `buffer' as well as
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 8cfd0278f3..2a50422abf 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