help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to get all paragraphs in list?


From: Teemu Likonen
Subject: Re: How to get all paragraphs in list?
Date: Mon, 05 Sep 2022 07:40:49 +0300
User-agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.1.91 (x86_64-pc-linux-gnu)

* 2022-09-05 07:15:50+0300, Jean Louis wrote:

> Starting function to join lines is this one:
>
> (defun join-lines ()
>   "Joins lines of a paragraph of 100000 chars."
>   (interactive)
>   (let ((old fill-column))
>     (setq fill-column 100000)
>     (fill-paragraph nil)
>     (setq fill-column old)))

Not answering your actual question but I noticed that the above function
can be simplified because fill-column is a dynamic (special) variable:

    (defun join-lines ()
      "Joins lines of a paragraph of 100000 chars."
      (interactive)
      (let ((fill-column 100000))
        (fill-paragraph)))

-- 
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 6965F03973F0D4CA22B9410F0F2CAE0E07608462

Attachment: signature.asc
Description: PGP signature


reply via email to

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