all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: 24870@debbugs.gnu.org, Matt Armstrong <marmstrong@google.com>,
	npostavs@users.sourceforge.net
Subject: bug#24870: 26.0.50; parse-partial-sexp ignores comment-end
Date: Thu, 15 Dec 2016 16:50:11 +0000	[thread overview]
Message-ID: <20161215165011.GB2437@acm.fritz.box> (raw)
In-Reply-To: <d89264c8-2e70-7149-c155-0f8945c6a398@easy-emacs.de>

Hello, Andreas.

On Thu, Dec 15, 2016 at 09:18:01AM +0100, Andreas Röhler wrote:


> On 14.12.2016 20:56, Alan Mackenzie wrote:

> > We're talking about 9dcf5998935c8aaa846d7585b81f0dcfe1935b3d from Sun
> > Mar 20 13:19:48 2016 +0000, still?

> > The idea is that in a (parse-partial-sexp from to), the end position
> > might be in the middle of a two character comment marker, such as "/*".
> > Before this change, it was impossible successfully to use the result of
> > that operation as the old state for continuing parse-partial-sexp from
> > that position, since it did not contain enough info to see it was in a
> > comment after passing the "*"

> > The change 9dcf599 added an extra element onto the parse state which was
> > non-nil when we end up after a "/", etc.



> Hi Alan,

> sounds like a classical mistake for me.

Quite possibly.

> You commented lately on the effect of narrowing and how simply to 
> respect its results. Nothing further to say here.

I don't see what your meaning is here, but never mind.

> OTOH: do you have a use-case, a bug, which propelled the amendment?

Yes.  It was quite a few years ago, but a bug in CC Mode was caused by
parse-partial-sexp terminating at a critical place, and the next
invocation of parse-partial-sexp thus going wrong.  I programmed round it
awkwardly at the time.

Also syntax-ppss would be falling into the trap quite a lot, I think.  I
don't think it checked specially for the critical case.  Now it doesn't
have to bother - at least, it won't as soon as Noam has corrected the
current bug.  ;-)

> Thanks,

> Andreas

-- 
Alan Mackenzie (Nuremberg, Germany).





  parent reply	other threads:[~2016-12-15 16:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03 19:38 bug#24870: 26.0.50; parse-partial-sexp ignores comment-end Andreas Röhler
2016-11-30  9:10 ` Matt Armstrong
2016-11-30 12:37   ` Andreas Röhler
2016-11-30 23:02     ` Matt Armstrong
2016-12-01  1:17       ` npostavs
2016-12-01  8:24         ` Andreas Röhler
2016-12-14  3:00           ` npostavs
2016-12-14  4:04             ` npostavs
2016-12-14  6:45               ` Andreas Röhler
2016-12-14 19:56               ` Alan Mackenzie
2016-12-15  8:18                 ` Andreas Röhler
2016-12-15 16:01                   ` Eli Zaretskii
2016-12-15 16:50                   ` Alan Mackenzie [this message]
2016-12-15 17:59                     ` Andreas Röhler
2016-12-14 21:58               ` Alan Mackenzie
2016-12-15 16:33                 ` Noam Postavsky
2016-12-15 16:44                   ` Alan Mackenzie
2016-12-18  5:39                     ` npostavs
2016-12-29 11:14                       ` Alan Mackenzie
2016-12-30  1:55                         ` npostavs
2017-01-13  2:07                           ` npostavs
2017-01-23 20:12                             ` Alan Mackenzie
2017-01-24  0:30                               ` npostavs
2016-12-01  8:33       ` Andreas Röhler

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=20161215165011.GB2437@acm.fritz.box \
    --to=acm@muc.de \
    --cc=24870@debbugs.gnu.org \
    --cc=andreas.roehler@easy-emacs.de \
    --cc=marmstrong@google.com \
    --cc=npostavs@users.sourceforge.net \
    /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.