www.delorie.com/gnu/docs/emacs-lisp-intro/emacs-lisp-intro_199.html   search  
Buy the book!

Programming in Emacs Lisp

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

With a fill prefix

The inner if expression just discussed is the else-part of an enclosing if expression which tests whether there is a fill prefix. If there is a fill prefix, the then-part of this if is evaluated. It looks like this:

(while (and (not (eobp))
            (not (looking-at paragraph-separate))
            (looking-at fill-prefix-regexp))
  (forward-line 1))

What this expression does is move point forward line by line so long as three conditions are true:

  1. Point is not at the end of the buffer.

  2. The text following point does not separate paragraphs.

  3. The pattern following point is the fill prefix regular expression.

The last condition may be puzzling, until you remember that point was moved to the beginning of the line early in the forward-paragraph function. This means that if the text has a fill prefix, the looking-at function will see it.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003