all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] emacs-25 326ffcc: Allow line comments ending with escaped NL to be continued to the next line.
Date: Mon, 28 Dec 2015 19:21:43 +0000	[thread overview]
Message-ID: <20151228192143.GA27715@acm.fritz.box> (raw)
In-Reply-To: <jwv8u4eimd7.fsf-monnier+emacsdiffs@gnu.org>

Hello, Stefan.

On Mon, Dec 28, 2015 at 11:14:36AM -0500, Stefan Monnier wrote:
> > -      /* Ignore escaped characters, except comment-enders.  */
> > -      if (code != Sendcomment && char_quoted (from, from_byte))
> > +      /* Ignore escaped characters, except comment-enders which cannot
> > +         be escaped.  */
> > +      if ((Vcomment_end_can_be_escaped || code != Sendcomment)
> > +          && char_quoted (from, from_byte))
> [...]
> >        if (code == Sendcomment
> >  	  && SYNTAX_FLAGS_COMMENT_STYLE (syntax, 0) == style
> >  	  && (SYNTAX_FLAGS_COMMENT_NESTED (syntax) ?
> > -	      (nesting > 0 && --nesting == 0) : nesting < 0))
> > +	      (nesting > 0 && --nesting == 0) : nesting < 0)
> > +          && !(Vcomment_end_can_be_escaped && char_quoted (from, from_byte)))

> Hmm... the way I read this, it would mean that

>         /*blabla\*/
                   ^
		   |
> will be treated as an unclosed comment.  Is that the way C defines it as well?

I've tried it, it's not the case.  The indicated * doesn't have
Sendcomment syntax, so the if statement doesn't trigger.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



      parent reply	other threads:[~2015-12-28 19:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151228160034.7510.58055@vcs.savannah.gnu.org>
     [not found] ` <E1aDaDr-0001xo-1I@vcs.savannah.gnu.org>
2015-12-28 16:14   ` [Emacs-diffs] emacs-25 326ffcc: Allow line comments ending with escaped NL to be continued to the next line Stefan Monnier
2015-12-28 16:41     ` Paul Eggert
2015-12-28 19:25       ` Alan Mackenzie
2015-12-28 19:21     ` Alan Mackenzie [this message]

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=20151228192143.GA27715@acm.fritz.box \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.