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

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

Re: Indent first line of each paragraph of file in one hit


From: Rodolfo Medina
Subject: Re: Indent first line of each paragraph of file in one hit
Date: Fri, 25 Nov 2016 12:20:45 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Konstantin Shakhnov <kastian@mail.ru> writes:

> On Fri, Nov 25, 2016 at 11:52:55AM +0000, Rodolfo Medina wrote:
>> This seems to work:
>>
>> (defun my-indent-first-line1 ()
>>   "Indent the first line of each paragraph"
>>   (interactive)
>>     (backward-paragraph)
>>     (next-line)
>>     (insert "        ")
>>     (fill-paragraph)
>>     )
>
>
> Yes, I've just made something similar. But there is a trap - if your
> file doesn't starts with '\n' you'll get wrong indentation of the
> first paraghaph


Yes, I see.  No way to avoid that?

Rodolfo



reply via email to

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