all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 15251-done@debbugs.gnu.org
Subject: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string
Date: Tue, 01 Oct 2013 20:32:06 -0400	[thread overview]
Message-ID: <jwveh84frmm.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <524AECFB.80608@yandex.ru> (Dmitry Gutov's message of "Tue, 01 Oct 2013 18:40:43 +0300")

>> We should probably rework the code to merge comment-use-syntax and
>> comment-use-global-state.

> I wonder what modes have the former variable set to t, but the latter to
> nil, and which situation this combination handles.

> Maybe enhance the check in `comment-normalize-vars' and set
> comment-use-syntax' to nil when the syntax table values are not good enough
> for `comment-use-global-state'?

> Then make `comment-use-global-state' an obsolete alias for
> comment-use-syntax'.

Maybe a better way to do it is:
- Change code that uses comment-use-global-state to use (and
  comment-use-syntax comment-use-global-state) instead.
- Set comment-use-global-state to t by default.
- Major modes where comment-use-global-state is problematic (if those
  exist) can then set comment-use-global-state to nil.
- Maybe make comment-use-global-state obsolete.

Context: the problem with syntax-ppss is not so much performance as
correctness, because syntax-ppss can get confused if you use several
syntax-tables in the same buffer (e.g. via font-lock-syntax-table), or
if you use narrowing.

As time goes on, more and more code relies on syntax-ppss so more and
more code gets rewritten to avoid font-lock-syntax-table (or at least
use it in "harmless" ways, e.g. only changing syntax from symbol to
word) and narrowing.  In turn, this makes syntax-ppss more robust and
more attractive.


        Stefan





  reply	other threads:[~2013-10-02  0:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03  1:26 bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string Dmitry Gutov
2013-09-29  3:59 ` Dmitry Gutov
2013-09-29 13:12   ` Andreas Röhler
2013-09-29 15:16     ` Dmitry Gutov
2013-09-30 18:27       ` Stefan Monnier
2013-10-01  1:18         ` Dmitry Gutov
2013-10-01 14:11           ` Stefan Monnier
2013-10-01 15:40             ` Dmitry Gutov
2013-10-02  0:32               ` Stefan Monnier [this message]
2013-10-02  0:50                 ` Dmitry Gutov
2013-10-02  7:22         ` Andreas Röhler
2013-10-02 11:19           ` Dmitry Gutov
2013-10-02 12:24             ` Andreas Röhler
2013-10-02 12:25               ` Dmitry Gutov
2013-10-02 14:08                 ` Andreas Röhler
2013-10-04  2:09                   ` Dmitry Gutov
2013-09-30 18:26   ` Stefan Monnier

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=jwveh84frmm.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=15251-done@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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.