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: Wed, 14 Jan 2015 18:15:24 -0700

Hi Bernardo,

that's awesome! Thanks! However, it's not quite working, although it's
almost there. I added this to my ~/.emacs file:

(add-hook 'f90-mode-hook
 (lambda ()
   (setq comment-start "!> ")
   (setq comment-continue "!! ")))

Hoping to be able to type something like this with the right indentation:

  !> A subroutine.
  !!
  !! @param a Parameter a.

However, what is happening is the following. I start the first line
and hit enter at the end. The cursor is positioned underneath the
"!>", so all is good. But no "!! " is inserted. Then I type "!!
@param..." and hit enter, and the line is moved all the way to the
left, so not aligned anymore with the comments above it. Could you
suggest some other variable(s) I could change?

Thanks already,

nick

On Wed, Jan 14, 2015 at 2:38 PM, Bernardo <address@hidden> wrote:
>
>> When in f90-mode with auto-fill-mode, emacs continues a comment by
>> indenting the new line and inserting a single '!' character at the
>> beginning. How do I change this string, say to "!! "?
>
> completely untested but may give you an idea:
>
> (add-hook 'f90-hook
>   (lambda ()
>     (setq comment-start "!! ")))
>



reply via email to

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