On Mon, 04 Oct 2004 21:39:59 +0100, Piers Cawley <[EMAIL PROTECTED]> wrote:
> Stéphane Payrard <[EMAIL PROTECTED]> writes:
> 
> > On Fri, Oct 01, 2004 at 06:09:37PM +0200, Jerome Quelin wrote:
> > This function is defined in emacs:
> >
> >   line-beginning-position is a built-in function.
> >   (line-beginning-position &optional N)

> > switch to emacs. :)
> 
> Or patch pir-mode.el, your choice.

That should be something like:

(defun line-beginning-position (&optional n)
  "Return the character position of the first character on the current line.
With argument N not nil or 1, move forward N - 1 lines first.
If scan reaches end of buffer, return that position."
  (save-excursion
    (beginning-of-line)
    (if n (next-line n))
    (point)))

no?

-- 
Aaron Sherman
Senior Systems Engineer and Toolsmith
[EMAIL PROTECTED] or [EMAIL PROTECTED]

Reply via email to