From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string Date: Tue, 01 Oct 2013 20:32:06 -0400 Message-ID: References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> <87wqlzpsj6.fsf@yandex.ru> <524A22E1.5000500@yandex.ru> <524AECFB.80608@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1380674000 3887 80.91.229.3 (2 Oct 2013 00:33:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Oct 2013 00:33:20 +0000 (UTC) Cc: 15251-done@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 02 02:33:22 2013 Return-path: Envelope-to: geb-bug-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 1VRANU-0005s5-9F for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Oct 2013 02:33:20 +0200 Original-Received: from localhost ([::1]:33329 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRANT-0008Gn-Dh for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Oct 2013 20:33:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRANK-0008GX-9W for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2013 20:33:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VRAND-0001Fx-0C for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2013 20:33:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRANC-0001Fn-TN for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2013 20:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VRANC-0001kS-G0 for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2013 20:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Oct 2013 00:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15251 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15251-done@debbugs.gnu.org id=D15251.13806739286652 (code D ref 15251); Wed, 02 Oct 2013 00:33:02 +0000 Original-Received: (at 15251-done) by debbugs.gnu.org; 2 Oct 2013 00:32:08 +0000 Original-Received: from localhost ([127.0.0.1]:48205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRAMK-0001jC-9F for submit@debbugs.gnu.org; Tue, 01 Oct 2013 20:32:08 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:31143) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRAMH-0001j3-1V for 15251-done@debbugs.gnu.org; Tue, 01 Oct 2013 20:32:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFxLEV/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFFxLEV/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="30852653" Original-Received: from 69-196-177-21.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.177.21]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 01 Oct 2013 20:28:46 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id D2797AEF0A; Tue, 1 Oct 2013 20:32:06 -0400 (EDT) In-Reply-To: <524AECFB.80608@yandex.ru> (Dmitry Gutov's message of "Tue, 01 Oct 2013 18:40:43 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78845 Archived-At: >> 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