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

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

Re: M-q on comments in source code


From: Stefan Monnier
Subject: Re: M-q on comments in source code
Date: Sat, 24 May 2014 10:21:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> This formatting is a bit silly ...  What can I do to get the comments
> formatted as in the first example, i. e. the comment indented with the
> source but with each line trimmed to a length of about max 75
> characters, not counting the indentation?

I find this to be a waste of space (you'll need windows
larger than 80 columns to comfortably edit/browse such files), but if
you really want that you can probably get it with something like:

   (advice-add 'current-file-column :around
     (lambda (orig)
       (if (derived-mode-p 'c-mode)
           (+ fill-column (current-indentation))
         (funcall orig))))


-- Stefan




reply via email to

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