# HG changeset patch # User Miles Bader # Date 966393205 0 # Node ID c9f7938027225ed5406f0d8b5217ccceb19b3bc1 # Parent b6b7264277b5b0d75ff263507a2398ff37414754 Add compatibility definition of comint-line-beginning-position. diff -r b6b7264277b5 -r c9f793802722 lisp/progmodes/sql.el --- 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