all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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: Thu, 15 Jan 2015 11:43:10 -0700	[thread overview]
Message-ID: <CAPMKG4B=79NXBhm6q8K5LTNBXsAPWkBarEYgej12UEK5s30V4Q@mail.gmail.com> (raw)
In-Reply-To: <CAPMKG4Ca2n0rv7SsmSzuoH6vie0pGD3qG2SQmMEicpXjXGMADw@mail.gmail.com>

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?

Thanks already,

nick

On Wed, Jan 14, 2015 at 6:15 PM, Nicolas Bock <nicolasbock@gmail.com> wrote:
> 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 18:43 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
2015-01-15 18:43   ` Nicolas Bock [this message]
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

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

  git send-email \
    --in-reply-to='CAPMKG4B=79NXBhm6q8K5LTNBXsAPWkBarEYgej12UEK5s30V4Q@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.