auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] auto-fill: automatic line break for comments


From: Mosè Giordano
Subject: Re: [AUCTeX] auto-fill: automatic line break for comments
Date: Mon, 27 May 2013 20:28:51 +0200

Hi Jannis,

2013/5/27 Jannis <address@hidden>:
> Dear Auctex users,
>
>
> I use auto-fill to automatically hard-wrap (i.e. insert line breaks) long
> lines after a specific length. These are the relevant lines in .emacs:
>
> (add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
> (add-hook 'latex-mode-hook 'turn-on-auto-fill)
> (add-hook 'text-mode-hook 'turn-on-auto-fill)
> (setq-default fill-column 80)
>
>
> This works fine. For comments it automatically inserts % signs for the new
> lines in case I type a comment. If I mark a whole region and use M-q,
> however, to correct the wrapping after some changes, comments are not
> automatically recognised, no % is inserted, and parts of the comment are
> treated as usual text. Only when I put the cursor into the same line again
> and hit M-q, the wrapping works fine. This, however, is not practical to
> change the wrapping of whole documents.
>
> Is there any solution to this?
See the "Filling" section in AUCTeX manual, (info "(auctex)Filling").
You can also use the `LaTeX-fill-buffer' command to fill the whole
buffer without marking it.

Bye,
Mosè



reply via email to

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