From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Bock Newsgroups: gmane.emacs.help Subject: Re: Continuation of comments in f90-mode with auto-fill Date: Thu, 15 Jan 2015 11:43:10 -0700 Message-ID: References: <8761c92gci.fsf@deb.home.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1421347456 31822 80.91.229.3 (15 Jan 2015 18:44:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2015 18:44:16 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Bernardo Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 15 19:44:15 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YBpOx-00011P-Ir for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2015 19:44:15 +0100 Original-Received: from localhost ([::1]:52190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBpOw-0005fZ-Po for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2015 13:44:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBpOc-0005ew-7R for help-gnu-emacs@gnu.org; Thu, 15 Jan 2015 13:43:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBpOa-0003PJ-NE for help-gnu-emacs@gnu.org; Thu, 15 Jan 2015 13:43:54 -0500 Original-Received: from mail-ie0-x22b.google.com ([2607:f8b0:4001:c03::22b]:56145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBpOa-0003PB-Iv for help-gnu-emacs@gnu.org; Thu, 15 Jan 2015 13:43:52 -0500 Original-Received: by mail-ie0-f171.google.com with SMTP id ar1so16576318iec.2 for ; Thu, 15 Jan 2015 10:43:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=339tZ5h89NYGleSVRTXZyR0BV4hqym07yGbs01z/LVg=; b=0Iw08c0cL34jaduP9SuIk9jQk3G59uwCszuWxrp/bqeeWkroX8MVsUqbES2kEeLQ29 ACaIVS9AidcQ89AJD2qw0e41fOalGQaWD8CA7ztRa6NNngbqokYndd7tnTcu9fJ6fxTB Euh/LosIcKVaabqbie485q3zWN8KiTsOl3WKCxnfM5jaOIjYxi5O6CCJ8eUiTdZbEXNv p/88Fnjk7/iN6V9UOlU2wiqmqOXms8gIS/Ao5uD9vN1cApVag07YtChCNi15WcyIl+bW /flMbu5W+MNGMjEK6BshGX3Yykl/iw96aZBeeWrz/IxhGZe5IEwumhwJayRxde139snc Wimw== X-Received: by 10.107.35.134 with SMTP id j128mr12012608ioj.4.1421347431307; Thu, 15 Jan 2015 10:43:51 -0800 (PST) Original-Received: by 10.107.14.136 with HTTP; Thu, 15 Jan 2015 10:43:10 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::22b X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102099 Archived-At: 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 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 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 "!! "))) >>