unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Nicolas Bock <nicolasbock@gmail.com>
To: Bernardo <bernardo.bacic@pobox.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Continuation of comments in f90-mode with auto-fill
Date: Wed, 14 Jan 2015 18:15:24 -0700	[thread overview]
Message-ID: <CAPMKG4Ca2n0rv7SsmSzuoH6vie0pGD3qG2SQmMEicpXjXGMADw@mail.gmail.com> (raw)
In-Reply-To: <8761c92gci.fsf@deb.home.net>

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 <bernardo.bacic@pobox.com> 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	other threads:[~2015-01-15  1:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 21:38 Continuation of comments in f90-mode with auto-fill Bernardo
2015-01-15  1:15 ` Nicolas Bock [this message]
2015-01-15 18:43   ` Nicolas Bock
2015-01-15 19:34     ` John Mastro
2015-01-15 21:25       ` Nicolas Bock
  -- strict thread matches above, loose matches on Subject: below --
2015-01-14 12:39 Nicolas Bock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPMKG4Ca2n0rv7SsmSzuoH6vie0pGD3qG2SQmMEicpXjXGMADw@mail.gmail.com \
    --to=nicolasbock@gmail.com \
    --cc=bernardo.bacic@pobox.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).