From: Miles Bader Date: Wed, 16 Aug 2000 02:34:28 +0000 (+0000) Subject: Add compatibility definition of comint-line-beginning-position. X-Git-Tag: emacs-pretest-21.0.90~2276 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=04231ab822f5ff597aac5c99b8277bbc36b24813;p=emacs.git Add compatibility definition of comint-line-beginning-position. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62defa4c9d9..052a30dd926 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-08-16 Miles Bader + + * progmodes/sql.el: Add compatibility definition onf + comint-line-beginning-position. + 2000-08-15 Gerd Moellmann * buff-menu.el (list-buffers-noselect): Set `buffer' as well as 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 @@ -653,6 +653,17 @@ This variable defaults to `sql-mode-ansi-font-lock-keywords'. This is 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