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

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

Re: Continuation of comments in f90-mode with auto-fill


From: Nicolas Bock
Subject: Re: Continuation of comments in f90-mode with auto-fill
Date: Thu, 15 Jan 2015 14:25:57 -0700

On Thu, Jan 15, 2015 at 12:34 PM, John Mastro <john.b.mastro@gmail.com> wrote:
> Nicolas Bock <nicolasbock@gmail.com> wrote:
>> Reading more in the manual I came across the key binding 'M-j'. When I type
>>
>> !> beginning...
>>
>> Press M-j, I get
>>
>> !> beginning...
>> !
>>
>> i.e. only a single '!' is inserted and not two as specified by
>> comment-continue. I read through the implementation in
>> newcomment.el::comment-indent-new-line() but I don't understand lisp
>> sufficiently to see where the single '! ' comes from. Could someone
>> give me a hint?
>
> I'm not familiar with Fortran or `f90-mode', so I could be missing
> something, but this seems to work for me:
>
>     (add-hook 'f90-mode-hook
>               (lambda ()
>                 (setq-local adaptive-fill-mode nil)
>                 (setq-local fill-prefix "!! ")))
>
M-j is inserting "!! " now, but aligns it all the way to the left :(

> --
> john



reply via email to

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