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?

- 14,195
- 22
- 56
- 52

- 25,949
- 8
- 77
- 100
-
1None of the answers have mentioned that `^L` is just the default value. You can set a buffer-local `page-delimiter` regexp to anything you want, to get page navigation functionality using some custom value. – phils Aug 20 '17 at 09:52
-
This is the [form feed character](https://en.wikipedia.org/wiki/Page_break#Form_feed), often represented as `\x0c` or `\f` – Boris Verkhovskiy Feb 13 '21 at 23:35
5 Answers
The Emacs commands backward-page
and forward-page
(C-x [
and C-x ]
), among others, take advantage of ^L
s 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 ^L
s with C-q C-l
.

- 25,949
- 8
- 77
- 100

- 79,187
- 7
- 161
- 281
This is a page break.
[...]
A page break can also be used for a logical separation of source-code sections. Emacs has commands and key bindings that use page breaks, such as ‘forward-page’ (
C-x ]
orC-]
), ‘backward-page’ (C-x [
orC-[
), and 'narrow-to-page' (C-x n p
). Other functions, such as ‘mark-page’, operate on the content of a page. See also PageMode.

- 11
- 2
-
7Otherwise known as a FORM-FEED character to people who remember line printers. – pavium Oct 16 '09 at 08:47
-
1
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.
See also Pretty Control-L if you want to change how Control-l characters appear -- e.g., use a highlighted line instead of just ^L
.

- 29,895
- 7
- 74
- 104
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.

- 6,013
- 3
- 26
- 38