[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Requested function: just-one-empty-line()

From: Sergei
Subject: Re: Requested function: just-one-empty-line()
Date: Mon, 6 Oct 2008 04:39:40 -0700 (PDT)
User-agent: G2/1.0

On Oct 6, 3:50 pm, Nordlöw <address@hidden> wrote:
> I'm looking for a function just-one-empty-line(), or empty-lines() for
> the multi-line-variant, that does kind of what just-one-space() does
> but instead works on empty lines. Any suggestions?

> Example:

> pre;\n
> \n
> \n
> post;

> is converted to

> pre;\n
> \n
> post;

"C-h k C-x C-o" tells me that

C-x C-o runs the command delete-blank-lines, which is an interactive
compiled Lisp function in `emacs/lisp/simple.el'.

It is bound to C-x C-o.


On blank line, delete all surrounding blank lines, leaving just one.
On isolated blank line, delete that one.
On nonblank line, delete any immediately following blank lines.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]