views:

388

answers:

5

Several times I see ^L in (mostly Emacs Lisp) source codes that looks like are separators of larger logical groups. Is it their real purpose? And if so, how can I use them? Is there a built-in Emacs functionality that utilize it?

+10  A: 

This is a page break.

Otherwise known as a FORM-FEED character to people who remember line printers.
pavium
Btw, they are in RFCs too (in .txts), but firefox doesn't show them.
andre-r
+2  A: 

That is indeed a page break character, which on older line printers skipped to the next page or paper. Code-wise, it does nothing; it is only there to split the code into larger sections. There are convenient Emacs commands to jump to the next and previous "page", and inserting these characters takes advantage of that.

Teddy
+16  A: 

The Emacs commands backward-page and forward-page (C-x [ and C-x ]), among others, take advantage of ^Ls placed in the code as separators.

The habit did not propagate much to languages other than Emacs-lisp, but most languages treat ^L as a blank, so you can use these separators in your favorite language if you like the idea. You can type your own ^Ls with C-q C-l.

Pascal Cuoq
A: 

A page break to split code into sections. See the following for more details.

http://www.emacswiki.org/emacs/PageBreaks

Brad Lucas
+1  A: 

When exploring a big file with multiple of such "pages" the function "narrow-to-page" (C-x n p) is handy: it hides everything not in the current page. Then for example searching for a function name to see the callers only leads to matches in that section, so you can really focus on understanding the narrowed region.

Use widen (C-x n w) to see the whole file again.

zut