From unknown Thu Jun 19 13:58:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#15251 <15251@debbugs.gnu.org> To: bug#15251 <15251@debbugs.gnu.org> Subject: Status: 24.3.50; do-auto-fill "continues" comment from inside a string Reply-To: bug#15251 <15251@debbugs.gnu.org> Date: Thu, 19 Jun 2025 20:58:26 +0000 retitle 15251 24.3.50; do-auto-fill "continues" comment from inside a string reassign 15251 emacs submitter 15251 Dmitry Gutov severity 15251 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 02 21:27:19 2013 Received: (at submit) by debbugs.gnu.org; 3 Sep 2013 01:27:19 +0000 Received: from localhost ([127.0.0.1]:38030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGfOo-00014I-Kc for submit@debbugs.gnu.org; Mon, 02 Sep 2013 21:27:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42661) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VGfOm-00013z-AX for submit@debbugs.gnu.org; Mon, 02 Sep 2013 21:27:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGfOY-0002Bc-FB for submit@debbugs.gnu.org; Mon, 02 Sep 2013 21:27:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGfOY-0002BY-Bn for submit@debbugs.gnu.org; Mon, 02 Sep 2013 21:27:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGfOP-0005ik-Rn for bug-gnu-emacs@gnu.org; Mon, 02 Sep 2013 21:27:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGfOH-0002A9-B1 for bug-gnu-emacs@gnu.org; Mon, 02 Sep 2013 21:26:53 -0400 Received: from mail-ea0-x233.google.com ([2a00:1450:4013:c01::233]:41975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGfOH-00029u-3k for bug-gnu-emacs@gnu.org; Mon, 02 Sep 2013 21:26:45 -0400 Received: by mail-ea0-f179.google.com with SMTP id b10so2615787eae.24 for ; Mon, 02 Sep 2013 18:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=g2lWg3mO5tATYkzn+VllC/iqQlXuQn3InM09gkCUIu0=; b=gcNUlsdGwtQTPpLup/OsHL1y2vfT1lvKIeUIC1JvzNAQ4imEQjdpVriQ687kJlEuVb TrNrivhGy9oT5S+DVQgGjakmJfLz907L9oWDz5SGaA0BJIBcirWIPwwP022/MdQPa3nZ Mfr0H/2KIXCKBmW+OZG0pCgxicpfh6Y0UTmI1uq3DDAZG+hsqLacNRnAuDRjnq9YJ9Rl D0v3ZdJmozqW1hgWaitSa7EcITcfovML9sM4kMmps6onECnvH8m1iSuDr3Cd3V92cJk6 2kjeiPntmPMH8kj3J69obnhKCfu1mdF4sIKmkwGjfD3JC8G33kSAE+vBGyLzCwBRnyEp X7FQ== X-Received: by 10.14.8.72 with SMTP id 48mr42153072eeq.25.1378171603997; Mon, 02 Sep 2013 18:26:43 -0700 (PDT) Received: from axl (62-118-214.netrun.cytanet.com.cy. [62.228.118.214]) by mx.google.com with ESMTPSA id a43sm27004859eep.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Sep 2013 18:26:43 -0700 (PDT) From: Dmitry Gutov To: bug-gnu-emacs@gnu.org Subject: 24.3.50; do-auto-fill "continues" comment from inside a string Date: Tue, 03 Sep 2013 04:26:26 +0300 Message-ID: <87ioyisnjx.fsf@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) In certain conditions, if I press SPC, and a string on the current line contains text matching `comment-start-skip', the filling is performed, and the newly created line starts with a comment. Examples (point is at |, fill-column is 70): ruby-mode: aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa#{}a" a| press SPC => aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa#{}a" #a js-mode: aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa//a" aa| press SPC => aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa//a" //aa From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 28 23:59:32 2013 Received: (at 15251) by debbugs.gnu.org; 29 Sep 2013 03:59:32 +0000 Received: from localhost ([127.0.0.1]:44196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQ8AN-0007df-6o for submit@debbugs.gnu.org; Sat, 28 Sep 2013 23:59:31 -0400 Received: from mail-ee0-f54.google.com ([74.125.83.54]:62828) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQ8AK-0007dU-RI for 15251@debbugs.gnu.org; Sat, 28 Sep 2013 23:59:29 -0400 Received: by mail-ee0-f54.google.com with SMTP id e53so1996103eek.27 for <15251@debbugs.gnu.org>; Sat, 28 Sep 2013 20:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=5og5txp1Fwe81OtozF/qx0ITFfyPhD6gxqJ9Ro7HY8I=; b=d4PDSWmrFoDzoDaOu6RSX7m8fB1nljyERUJhpW5Ec9oaNpizPnGw6LZ3JPnuMJXIoA MsQJOdw1okpd9eAG1OoonRupTah3c8GIhujlmEh4Ps9LF5JXmpVWoCdT4crf7VE/UspV m71hIfGeWWD5c3G65t+UhsaPrQ7H0pu9/0gcKEr43SRiPi/NwOrTvjhKYxCjjiX9MIYH /rIiBZZqRWIgBB2Bomu7MFNrArdtCEOYX0c3njEDaZ3txA6jxIFk/HoIN1mzVXT7JpZa R8pR7h7Ie6gjRZ1H7GG5ITSOGpB36cmkdDFaRGabxU0WhAEy525eRXNddvbJWYPyhsLo SRzQ== X-Received: by 10.14.45.70 with SMTP id o46mr24866932eeb.19.1380427167519; Sat, 28 Sep 2013 20:59:27 -0700 (PDT) Received: from axl (62-118-214.netrun.cytanet.com.cy. [62.228.118.214]) by mx.google.com with ESMTPSA id h52sm34808768eez.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 28 Sep 2013 20:59:26 -0700 (PDT) From: Dmitry Gutov To: 15251@debbugs.gnu.org Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string References: <87ioyisnjx.fsf@yandex.ru> Date: Sun, 29 Sep 2013 06:59:17 +0300 In-Reply-To: <87ioyisnjx.fsf@yandex.ru> (Dmitry Gutov's message of "Tue, 03 Sep 2013 04:26:26 +0300") Message-ID: <87y56gwa5m.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15251 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Dmitry Gutov writes: > In certain conditions, if I press SPC, and a string on the current line > contains text matching `comment-start-skip', the filling is performed, > and the newly created line starts with a comment. > > Examples (point is at |, fill-column is 70): > > ruby-mode: > > aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa#{}a" a| > > press SPC => > > aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa#{}a" > #a > > js-mode: > > aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa//a" aa| > > press SPC => > > aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa//a" > //aa I've tracked this to misbehaving `comment-beginning'. Since we start outside of string, and the comment char(s) are inside the string on the same line, the check comparing the face at point to `font-lock-string-face' doesn't work. And in ruby-mode's case, since interpolations use a different face, even putting a similar guard to check at `cs' won't help. As I see it, we either have to use `syntax-ppss' here, or trust font-lock. The latter means not skipping other checks even if `comment-end-skip' is defined and doesn't match at point, and also only trusting "let's assume ... if we're on the same line" when font-lock-mode is disabled. How does this change look? Seems to work fine. (As an aside, I'm having hard time understanding which search is supposed to have set the match data used by `(match-end 0)' there. Is it `comment-search-backward'? Or `(looking-at comment-end-skip)'?) === modified file 'lisp/newcomment.el' --- lisp/newcomment.el 2013-06-18 17:57:56 +0000 +++ lisp/newcomment.el 2013-09-29 03:41:18 +0000 @@ -526,12 +526,13 @@ (and ;; For modes where comment-start and comment-end are the same, ;; the search above may have found a `ce' rather than a `cs'. - (or (if comment-end-skip (not (looking-at comment-end-skip))) - ;; Maybe font-lock knows that it's a `cs'? + (if comment-end-skip (not (looking-at comment-end-skip))) + (or ;; Maybe font-lock knows that it's a `cs'? (eq (get-text-property (match-end 0) 'face) 'font-lock-comment-face) - (unless (eq (get-text-property (point) 'face) - 'font-lock-comment-face) + (unless (or (eq (get-text-property (point) 'face) + 'font-lock-comment-face) + font-lock-mode) ;; Let's assume it's a `cs' if we're on the same line. (>= (line-end-position) pt))) ;; Make sure that PT is not past the end of the comment. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 29 09:11:08 2013 Received: (at submit) by debbugs.gnu.org; 29 Sep 2013 13:11:08 +0000 Received: from localhost ([127.0.0.1]:44582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQGmB-00059O-66 for submit@debbugs.gnu.org; Sun, 29 Sep 2013 09:11:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42838) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQGm9-00059G-8x for submit@debbugs.gnu.org; Sun, 29 Sep 2013 09:11:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQGm1-0002PM-SZ for submit@debbugs.gnu.org; Sun, 29 Sep 2013 09:11:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQGm1-0002PI-Pc for submit@debbugs.gnu.org; Sun, 29 Sep 2013 09:10:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQGlv-0008Hs-JT for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 09:10:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQGlo-0002O0-HM for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 09:10:51 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:53794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQGlo-0002Ns-7d for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2013 09:10:44 -0400 Received: from purzel.sitgens (brln-4dba32f8.pool.mediaWays.net [77.186.50.248]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MFE4N-1Vc5HN0idP-00GG5V; Sun, 29 Sep 2013 15:10:42 +0200 Message-ID: <52482759.1070804@easy-emacs.de> Date: Sun, 29 Sep 2013 15:12:57 +0200 From: =?ISO-8859-15?Q?Andreas_R=F6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> In-Reply-To: <87y56gwa5m.fsf@yandex.ru> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:KaOuKHHH+CZwXbEgK8LBLnrVOqww3KdqEuFRh22GgUP F4rR6nwzKiYjBLV+EcT4hQro6V9ewHwSut+infVqSCQeWADI+A 5KQ32pDnVBXbbDHyzbp5IbbidqF02o7y02JNtAfP6CFA/8VnCn DAPAU8lepPYCLdAdg9Lg9circ529Zhd0dIYpYYPLNwmATpwg21 bVD3WYobpPr2058ZrVRI7NOwetQhzFghNH/VB8wDeRoE8SukVo H6hWGfgwm4eF6PF5rIxeL38SIhJg7O05aSW74xH4x4ZrZjfFue k/V7MgtMDwm6FH9Ovq+WBH8dsQHxyKCsWrPGk1pJnuR2crRLfx 3S2fMDNb4G6jvwhu2TKfOnuiaehVjbwvaDOYxp0e8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Am 29.09.2013 05:59, schrieb Dmitry Gutov: > Dmitry Gutov writes: > >> In certain conditions, if I press SPC, and a string on the current line >> contains text matching `comment-start-skip', the filling is performed, >> and the newly created line starts with a comment. >> >> Examples (point is at |, fill-column is 70): >> >> ruby-mode: >> >> aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa#{}a" a| >> >> press SPC => >> >> aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa#{}a" >> #a >> >> js-mode: >> >> aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa//a" aa| >> >> press SPC => >> >> aa = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa//a" >> //aa > > I've tracked this to misbehaving `comment-beginning'. Since we start > outside of string, and the comment char(s) are inside the string on the > same line, the check comparing the face at point to > `font-lock-string-face' doesn't work. > > And in ruby-mode's case, since interpolations use a different face, even > putting a similar guard to check at `cs' won't help. > > As I see it, we either have to use `syntax-ppss' here, or trust > font-lock. The latter means not skipping other checks even if > `comment-end-skip' is defined and doesn't match at point, and also > only trusting "let's assume ... if we're on the same line" when > font-lock-mode is disabled. > > How does this change look? Seems to work fine. > > (As an aside, I'm having hard time understanding which search is > supposed to have set the match data used by `(match-end 0)' there. Is it > `comment-search-backward'? Or `(looking-at comment-end-skip)'?) > > === modified file 'lisp/newcomment.el' > --- lisp/newcomment.el 2013-06-18 17:57:56 +0000 > +++ lisp/newcomment.el 2013-09-29 03:41:18 +0000 > @@ -526,12 +526,13 @@ > (and > ;; For modes where comment-start and comment-end are the same, > ;; the search above may have found a `ce' rather than a `cs'. > - (or (if comment-end-skip (not (looking-at comment-end-skip))) > - ;; Maybe font-lock knows that it's a `cs'? > + (if comment-end-skip (not (looking-at comment-end-skip))) > + (or ;; Maybe font-lock knows that it's a `cs'? > (eq (get-text-property (match-end 0) 'face) > 'font-lock-comment-face) > - (unless (eq (get-text-property (point) 'face) > - 'font-lock-comment-face) > + (unless (or (eq (get-text-property (point) 'face) > + 'font-lock-comment-face) > + font-lock-mode) > ;; Let's assume it's a `cs' if we're on the same line. > (>= (line-end-position) pt))) > ;; Make sure that PT is not past the end of the comment. > > > > > Reading the face for detecting basic things like comment is terrible. What did the author smoke when writing this ;) BTW from my experience jumping to (nth 8 (syntax-ppss)) works well. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 29 11:16:51 2013 Received: (at 15251) by debbugs.gnu.org; 29 Sep 2013 15:16:51 +0000 Received: from localhost ([127.0.0.1]:44931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQIjq-0000ko-DR for submit@debbugs.gnu.org; Sun, 29 Sep 2013 11:16:51 -0400 Received: from mail-ea0-f180.google.com ([209.85.215.180]:56546) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQIjk-0000kZ-F6 for 15251@debbugs.gnu.org; Sun, 29 Sep 2013 11:16:45 -0400 Received: by mail-ea0-f180.google.com with SMTP id h10so2171297eaj.11 for <15251@debbugs.gnu.org>; Sun, 29 Sep 2013 08:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=fJCCwmFxOfS7c5RDOmq6XucHYzqK1/dltvJQ+tCHQGc=; b=ZQr4X+VUqynu8cvVo8MzK5FsVq7lo+AJoA1MO/93iqBhZQ+O+yE11xLA0o1mbp8+W+ J0PQ5epRP8jHHGSBSc2MIj40x3eg02clSEXiVs4emLWd2VYRo/uFweM2gku1E8QM4x6d nNFSkU01k9Ul4uwlPuDRbyxHqCXKp8wWTIpxvDUzG8X2jpQrT28kz24qNd3V+dTKBgN7 7ViBoFd36PAzZuCIU5vLStWxWy4ng76OgHyYSkfOKpy85Qeu6/AUW8GAD+lD/eQU7lqL iLar764xBznnP9l1CBSO3G9tdBhQqHH5YaCUtJ06SCrLBOf1isYkHNqwfM6dkbkpaei4 8IuQ== X-Received: by 10.15.98.194 with SMTP id bj42mr29518630eeb.12.1380467803293; Sun, 29 Sep 2013 08:16:43 -0700 (PDT) Received: from axl (62-118-214.netrun.cytanet.com.cy. [62.228.118.214]) by mx.google.com with ESMTPSA id f49sm40384436eec.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 29 Sep 2013 08:16:42 -0700 (PDT) From: Dmitry Gutov To: Andreas =?utf-8?Q?R=C3=B6hler?= Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> Date: Sun, 29 Sep 2013 18:16:29 +0300 In-Reply-To: <52482759.1070804@easy-emacs.de> ("Andreas \=\?utf-8\?Q\?R\=C3\=B6h\?\= \=\?utf-8\?Q\?ler\=22's\?\= message of "Sun, 29 Sep 2013 15:12:57 +0200") Message-ID: <87wqlzpsj6.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15251 Cc: 15251@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Andreas R=C3=B6hler writes: > Reading the face for detecting basic things like comment is terrible. It sure is. It can be justified for very hot functions, but otherwise `syntax-ppss' does a better job in (more or less) constant time. But that code was written in 2001, a few months before `syntax-ppss' was introduced. > What did the author smoke when writing this ;) Let's ask him. :) Stefan, can we consider `syntax-ppss' fast enough at this point? It will mean re-implementing `comment-search-backward' in terms of it, and removing most of the code in `comment-beginning' definition. AFAICT, both of these functions are not particularly hot, and are called once or twice per user action, at most. `comment-search-backward' can also be made to respect `comment-use-syntax' (and use its current definition if that var's value is nil), but if comments don't have valid entries in the syntax table, font-lock won't recognize them (or will it?), and then the dance with face properties is not useful either. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 30 14:26:48 2013 Received: (at 15251) by debbugs.gnu.org; 30 Sep 2013 18:26:48 +0000 Received: from localhost ([127.0.0.1]:46198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQiBC-0000l7-KC for submit@debbugs.gnu.org; Mon, 30 Sep 2013 14:26:47 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:46545) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQiB9-0000kw-3S for 15251@debbugs.gnu.org; Mon, 30 Sep 2013 14:26:43 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r8UIQglb014969; Mon, 30 Sep 2013 14:26:42 -0400 Received: by pastel.home (Postfix, from userid 20848) id D462C631AA; Mon, 30 Sep 2013 14:26:41 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string Message-ID: References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> Date: Mon, 30 Sep 2013 14:26:41 -0400 In-Reply-To: <87y56gwa5m.fsf@yandex.ru> (Dmitry Gutov's message of "Sun, 29 Sep 2013 06:59:17 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV4717=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4717> : inlines <110> : streams <1047773> : uri <1551946> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 15251 Cc: 15251@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.0 (--) > As I see it, we either have to use `syntax-ppss' here, or trust > font-lock. Relying on syntax-ppss would be better than relying font-lock faces. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 30 14:27:43 2013 Received: (at 15251) by debbugs.gnu.org; 30 Sep 2013 18:27:43 +0000 Received: from localhost ([127.0.0.1]:46202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQiC7-0000mr-FJ for submit@debbugs.gnu.org; Mon, 30 Sep 2013 14:27:43 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:59190) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQiC5-0000mj-U3 for 15251@debbugs.gnu.org; Mon, 30 Sep 2013 14:27:42 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r8UIReHL022149; Mon, 30 Sep 2013 14:27:40 -0400 Received: by pastel.home (Postfix, from userid 20848) id 019C7631AA; Mon, 30 Sep 2013 14:27:39 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string Message-ID: References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> <87wqlzpsj6.fsf@yandex.ru> Date: Mon, 30 Sep 2013 14:27:39 -0400 In-Reply-To: <87wqlzpsj6.fsf@yandex.ru> (Dmitry Gutov's message of "Sun, 29 Sep 2013 18:16:29 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV4717=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4717> : inlines <110> : streams <1047774> : uri <1551946> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 15251 Cc: 15251@debbugs.gnu.org, Andreas =?windows-1252?Q?R=F6hler?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.0 (--) > Stefan, can we consider `syntax-ppss' fast enough at this point? If comment-use-syntax is t, yes. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 30 21:18:32 2013 Received: (at 15251-done) by debbugs.gnu.org; 1 Oct 2013 01:18:32 +0000 Received: from localhost ([127.0.0.1]:46458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQobf-0001kk-Vm for submit@debbugs.gnu.org; Mon, 30 Sep 2013 21:18:32 -0400 Received: from mail-ee0-f54.google.com ([74.125.83.54]:57167) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQobe-0001kc-1w for 15251-done@debbugs.gnu.org; Mon, 30 Sep 2013 21:18:30 -0400 Received: by mail-ee0-f54.google.com with SMTP id e53so3121010eek.27 for <15251-done@debbugs.gnu.org>; Mon, 30 Sep 2013 18:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=1NozbgRyQ1ObCVNAaGUKA6epJbwyJKozv4dNJzCoEwI=; b=VP6cMfCMYaMAiqOOnXlbS9md48JCacpR2tN08WPZVzMJ7B9wUoYGTukoO2o9q1+/Ii yLssptaGGZE/XaY1agSIqd+hkF6e0dmL+KEFPOvz3wjUk3TntqbQVHCRd65VHcwsAzmM UziAflMQBYAYlOVg5gGsBA0KJNq6eVec2OFMJ/hirVWjuCra2XSa/GOjhyT2FsBCTww8 whwmjYwf9A9J2VjV10s6q1o6QCT88W8z/pDSWICITdRmKgAjoqV9ldszwVdXgnVJSMOz tW4WL/mbEoO3xAehk1vBYiyamX+mPhk69IxZIcC07IwuSlti5prHbunZPTklv6P+2cam lHGg== X-Received: by 10.14.5.133 with SMTP id 5mr119097eel.56.1380590308879; Mon, 30 Sep 2013 18:18:28 -0700 (PDT) Received: from [192.168.10.2] (62-118-214.netrun.cytanet.com.cy. [62.228.118.214]) by mx.google.com with ESMTPSA id r48sm6999296eev.14.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Sep 2013 18:18:28 -0700 (PDT) Message-ID: <524A22E1.5000500@yandex.ru> Date: Tue, 01 Oct 2013 04:18:25 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> <87wqlzpsj6.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15251-done Cc: 15251-done@debbugs.gnu.org, =?ISO-8859-1?Q?Andreas_R=F6hler?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Version: 24.4 On 30.09.2013 21:27, Stefan Monnier wrote: >> Stefan, can we consider `syntax-ppss' fast enough at this point? > > If comment-use-syntax is t, yes. Done, in 114486. I kept the rest of `comment-beginning' definition, in case non-syntax-table-using comments can still be font-locked in some modes. Also, `comment-use-global-state' looks like a better var to base the choice on, semantically, but it's not auto-detected, and it's only used in `comment-search-forward'. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 01 10:12:00 2013 Received: (at 15251-done) by debbugs.gnu.org; 1 Oct 2013 14:12:00 +0000 Received: from localhost ([127.0.0.1]:47406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VR0gC-0003xi-1Y for submit@debbugs.gnu.org; Tue, 01 Oct 2013 10:12:00 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:17541) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VR0gA-0003xT-CB for 15251-done@debbugs.gnu.org; Tue, 01 Oct 2013 10:11:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd+E1/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFLd+E1/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="29510819" Received: from 75-119-225-53.dsl.teksavvy.com (HELO pastel.home) ([75.119.225.53]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 01 Oct 2013 10:08:41 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1803D66B70; Tue, 1 Oct 2013 10:11:57 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string Message-ID: References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> <87wqlzpsj6.fsf@yandex.ru> <524A22E1.5000500@yandex.ru> Date: Tue, 01 Oct 2013 10:11:57 -0400 In-Reply-To: <524A22E1.5000500@yandex.ru> (Dmitry Gutov's message of "Tue, 01 Oct 2013 04:18:25 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15251-done Cc: 15251-done@debbugs.gnu.org, Andreas =?windows-1252?Q?R=F6hler?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Also, `comment-use-global-state' looks like a better var to base the choice Good point. > on, semantically, but it's not auto-detected, and it's only used in > comment-search-forward'. We should probably rework the code to merge comment-use-syntax and comment-use-global-state. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 01 11:40:50 2013 Received: (at 15251-done) by debbugs.gnu.org; 1 Oct 2013 15:40:50 +0000 Received: from localhost ([127.0.0.1]:47553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VR24A-00067e-0j for submit@debbugs.gnu.org; Tue, 01 Oct 2013 11:40:50 -0400 Received: from mail-ea0-f172.google.com ([209.85.215.172]:47137) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VR248-00067W-CE for 15251-done@debbugs.gnu.org; Tue, 01 Oct 2013 11:40:48 -0400 Received: by mail-ea0-f172.google.com with SMTP id r16so3535810ead.3 for <15251-done@debbugs.gnu.org>; Tue, 01 Oct 2013 08:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=3AggIgUKa3rPe3xynpuL56AFr1VdmL4b21lJ/aKvGWE=; b=kwZqOpOBkHh+RvYJQ286KT0jtYPfuZLE4cmNdhxIY9FqorKM/liwcv6M4rgZS6Pczc 4+zRo6BFWKosYcVZKS9LhXBeuF2Yo/EyLBseb5G1Bve1sB4vllzaYXkUo4XVVzcTy/0G PzTcwkHB2al71WeYggoz2+8WgMU/zJFO5cqJBD0TpiuvrDoa/a26DdWPkbO6jcAJ4wJk ZF236GczqMCNhikYc+AGKfCRISAClNliyl5BDMu163tlISPOPm8h23i1j3zLsRnbdDF7 tBfo2LaDcA6DdZlEXGBVIUcfLr8xQRjJr3CadjaJqDBdQDbycRAPTReVZ/wFhv/juW4+ HEmA== X-Received: by 10.14.178.67 with SMTP id e43mr3898094eem.59.1380642047418; Tue, 01 Oct 2013 08:40:47 -0700 (PDT) Received: from [192.168.10.48] (93-245-142.netrun.cytanet.com.cy. [93.109.245.142]) by mx.google.com with ESMTPSA id f49sm14559361eec.7.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Oct 2013 08:40:46 -0700 (PDT) Message-ID: <524AECFB.80608@yandex.ru> Date: Tue, 01 Oct 2013 18:40:43 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> <87wqlzpsj6.fsf@yandex.ru> <524A22E1.5000500@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15251-done Cc: 15251-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 01.10.2013 17:11, Stefan Monnier wrote: > 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'. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 01 20:32:08 2013 Received: (at 15251-done) by debbugs.gnu.org; 2 Oct 2013 00:32:08 +0000 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 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" 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 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id D2797AEF0A; Tue, 1 Oct 2013 20:32:06 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string 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> Date: Tue, 01 Oct 2013 20:32:06 -0400 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) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15251-done Cc: 15251-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 01 20:50:46 2013 Received: (at 15251-done) by debbugs.gnu.org; 2 Oct 2013 00:50:46 +0000 Received: from localhost ([127.0.0.1]:48229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRAeL-0002Av-Dh for submit@debbugs.gnu.org; Tue, 01 Oct 2013 20:50:45 -0400 Received: from mail-ea0-f181.google.com ([209.85.215.181]:49142) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRAeE-0002Ah-Mg for 15251-done@debbugs.gnu.org; Tue, 01 Oct 2013 20:50:43 -0400 Received: by mail-ea0-f181.google.com with SMTP id d10so43804eaj.12 for <15251-done@debbugs.gnu.org>; Tue, 01 Oct 2013 17:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=mwKwXu0avhSNEr1LQZ5/sS/9NH87Mpi777wJYXlDGkk=; b=jyoAkiVM20P9THq9Uzh8a5gzLIcKkzSCzbFVR7WkMrCilPLHkN9bvOsOycx5MEJHFQ FAL2V49EhU/tTv64QTtv2D4+ashVYTOGh2vLV+4RqDk9dZthLE7QXy2WF7sLwIAEPgiC +qAezsdWr6h78VarI21edVZy0Nwt5wuriSuv5ZdxLXX4bM7HL6VZu8OGD9J4LE3H3Tyv /W1tP+sUv+Bqna+yUAxX2PvkZlslbz4+Wf3OfXb2xQdBo9AyKDO6p5/vmNtBU93E+QTt 7O+xD7RKUn60dRIVZdbaSZOGxNsQHND0p5rfM88DKN5PRzW8gCVUCQ09eAcZUvg2VXlU uoqQ== X-Received: by 10.14.214.136 with SMTP id c8mr49689073eep.6.1380675037706; Tue, 01 Oct 2013 17:50:37 -0700 (PDT) Received: from [192.168.10.2] (62-118-214.netrun.cytanet.com.cy. [62.228.118.214]) by mx.google.com with ESMTPSA id v8sm18936737eeo.12.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Oct 2013 17:50:36 -0700 (PDT) Message-ID: <524B6DDA.3050601@yandex.ru> Date: Wed, 02 Oct 2013 03:50:34 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15251-done Cc: 15251-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 02.10.2013 03:32, Stefan Monnier wrote: > - Change code that uses comment-use-global-state to use (and > comment-use-syntax comment-use-global-state) instead. This is already the case: `comment-search-forward' consults the value of `comment-use-global-state' only when `comment-use-syntax' is truthy. > - 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. Yes, that seems hard to test for. And if `syntax-ppss' can be borked in some modes, using its value in `comment-beginning' like I did in the respective patch, also seems unsafe. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 03:20:37 2013 Received: (at 15251) by debbugs.gnu.org; 2 Oct 2013 07:20:37 +0000 Received: from localhost ([127.0.0.1]:48584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRGjc-0002lk-Is for submit@debbugs.gnu.org; Wed, 02 Oct 2013 03:20:37 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:50863) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRGjY-0002lZ-Fh for 15251@debbugs.gnu.org; Wed, 02 Oct 2013 03:20:33 -0400 Received: from purzel.sitgens (brln-4d0c0cfb.pool.mediaWays.net [77.12.12.251]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0Lwqoy-1VthjP2SN6-016PmN; Wed, 02 Oct 2013 09:20:28 +0200 Message-ID: <524BC9C4.9080301@easy-emacs.de> Date: Wed, 02 Oct 2013 09:22:44 +0200 From: =?ISO-8859-15?Q?Andreas_R=F6hler?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Stefan Monnier , Dmitry Gutov Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> <87wqlzpsj6.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:ZPNTf9VOJd8fEPpYv/+mwqHkbvHfr4tpC0Avi6kok6M O0juOS4Neua04L70hBeA4bxiHcq/7SlpH+qo1pJm3u0ZZlN1mg v/dxWwbXwfVXEuISM8B5Vb6fZM1LZulaX/PmEsOAi6yehmklg3 1RrytDA8GlmMQs4aeSSqO3+uy2iZEebSMhvClkWPeW/35CcnQU yFOzUpIPzDfK6O/sUIDRcMmuV5BxzXl+y5ef16HLCry1dmMxwg jkHifii5TfS1ZJEf3OxmBG6xBI2trBPCvPWQE2yKfvJ2AVGP16 Z/N/pIY3eSHd8jJo5oMWe+PKpGIQ9ut+pku70fZeKyhstzskmY rpY0V658EgyzUOBcaaTI= X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 15251 Cc: 15251@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Am 30.09.2013 20:27, schrieb Stefan Monnier: >> Stefan, can we consider `syntax-ppss' fast enough at this point? > > If comment-use-syntax is t, yes. > > > Stefan > In case not, an alternative to faces should be introduced still. Setting of comment-face might fail for several reasons. Comment-move should not rely on that. What about searching for comment-start than? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 07:20:11 2013 Received: (at 15251) by debbugs.gnu.org; 2 Oct 2013 11:20:11 +0000 Received: from localhost ([127.0.0.1]:49018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRKTS-0008VV-SC for submit@debbugs.gnu.org; Wed, 02 Oct 2013 07:20:11 -0400 Received: from mail-ee0-f52.google.com ([74.125.83.52]:36208) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRKTN-0008VK-RX for 15251@debbugs.gnu.org; Wed, 02 Oct 2013 07:20:06 -0400 Received: by mail-ee0-f52.google.com with SMTP id c41so313850eek.39 for <15251@debbugs.gnu.org>; Wed, 02 Oct 2013 04:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=82H9g9ArWU9IXOyFnvxgy4Vq3J+iD+xmS7JQUGc6kwQ=; b=nSYnxemkIy6wk3R9+sRpb0mVMser9P8F1B6RZKqCYcFzqi7plhlNOySoL6Py0rELj3 qq8+p8nYi8njb9SH23zn+iaMP722dxLBvqY7flHgRE7dT6B2nIhceBVbMDBWBmWjxLgd IS1u6dInUIXJCGHSp1zst3R+WFYznpJLBzU63U+r9Y7uKbPs0Qjy/cicH3yN3gSs4Va5 l75uL67ybTkHD0t6bCYhIb9uKOMadODFEyNf4mORsw6PnZcue3bg2oSEr92HTnxufWX/ KFJqvF0OVMpBHEDJQD5Yzh/qEkGU1lCb8bs9a8W3F3rlM7J94+/ilB0FxgCYjnj9bA5s eeuw== X-Received: by 10.14.174.131 with SMTP id x3mr2363584eel.61.1380712804961; Wed, 02 Oct 2013 04:20:04 -0700 (PDT) Received: from axl (93-245-142.netrun.cytanet.com.cy. [93.109.245.142]) by mx.google.com with ESMTPSA id m54sm2755622eex.2.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 02 Oct 2013 04:20:04 -0700 (PDT) From: Dmitry Gutov To: Andreas =?utf-8?Q?R=C3=B6hler?= Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> <87wqlzpsj6.fsf@yandex.ru> <524BC9C4.9080301@easy-emacs.de> Date: Wed, 02 Oct 2013 14:19:58 +0300 In-Reply-To: <524BC9C4.9080301@easy-emacs.de> ("Andreas \=\?utf-8\?Q\?R\=C3\=B6h\?\= \=\?utf-8\?Q\?ler\=22's\?\= message of "Wed, 02 Oct 2013 09:22:44 +0200") Message-ID: <87txgz3oo1.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15251 Cc: 15251@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Andreas R=C3=B6hler writes: > In case not, an alternative to faces should be introduced still. > Setting of comment-face might fail for several reasons. > Comment-move should not rely on that. > > What about searching for comment-start than? `comment-beginning' calls `comment-search-backward', which searches for `comment-start-skip'. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 08:21:55 2013 Received: (at 15251) by debbugs.gnu.org; 2 Oct 2013 12:21:55 +0000 Received: from localhost ([127.0.0.1]:49134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRLRC-0002hD-KB for submit@debbugs.gnu.org; Wed, 02 Oct 2013 08:21:55 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:51255) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRLR7-0002h1-VP for 15251@debbugs.gnu.org; Wed, 02 Oct 2013 08:21:51 -0400 Received: from purzel.sitgens (brln-4d0c0cfb.pool.mediaWays.net [77.12.12.251]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MSp3l-1VHomC4B1R-00RWXc; Wed, 02 Oct 2013 14:21:46 +0200 Message-ID: <524C1061.7010303@easy-emacs.de> Date: Wed, 02 Oct 2013 14:24:01 +0200 From: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Dmitry Gutov Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> <87wqlzpsj6.fsf@yandex.ru> <524BC9C4.9080301@easy-emacs.de> <87txgz3oo1.fsf@yandex.ru> In-Reply-To: <87txgz3oo1.fsf@yandex.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:0Xj2pL9o5ueBmX2nIieIt4IZnHBSrToMcljicBLpGcq YpvLYDoZqbxqF0VNUM7sPmxcu36/udgHidJde/+uZjXo0fmYhA j1LL/apr4I3CytfrWEIfI8EyHxM8k+Nliugp9OSjzFiXK2Fuah cvC5vv1Bbq9fha7TCxOsqzHOO4LaUHxO3TokFMr6Df6HTcuy95 c6D8ef1WaXJkN/6ipmNDomN/ut8mYq2F5BdCBUUej1xBiesb3F z+cozAnrw4GPlplE+ks5DTWc9wnlFLqgr4reHmrEW3pwQyeklZ 9z1PCLBoElFIsIO1hry4rw+zKdby2e/YNTM1HeEmXSWNGcgv8a 1IFWV5BfP+CgLSnJeL3s= X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 15251 Cc: 15251@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Am 02.10.2013 13:19, schrieb Dmitry Gutov: > Andreas Röhler writes: >> In case not, an alternative to faces should be introduced still. >> Setting of comment-face might fail for several reasons. >> Comment-move should not rely on that. >> >> What about searching for comment-start than? > > `comment-beginning' calls `comment-search-backward', which searches for > `comment-start-skip'. > Okay, so it got rid of the faces-search? Cheers From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 08:25:11 2013 Received: (at 15251) by debbugs.gnu.org; 2 Oct 2013 12:25:11 +0000 Received: from localhost ([127.0.0.1]:49143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRLUM-0002mM-1y for submit@debbugs.gnu.org; Wed, 02 Oct 2013 08:25:10 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:52049) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRLUH-0002m9-P5 for 15251@debbugs.gnu.org; Wed, 02 Oct 2013 08:25:06 -0400 Received: by mail-ee0-f45.google.com with SMTP id c50so354286eek.32 for <15251@debbugs.gnu.org>; Wed, 02 Oct 2013 05:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=4Hf7ZY8BwFRU+Ns6f11JjAFr592CSnHUAzegJeMGcok=; b=C8FvBLYPPH1ZeC5EFErTHk+iali9iali9u2okjg+RxXRH90bqb9fmiBasnx3Ac7sjH aN+LBVnhPJTx7r0Im60UhfN8AnPmC7ytneg+M+K36opLe2EpJI03tkKSUCalI4FZ93zI 4Hsevw2DeKnmWPr64Xj0KERCjbW19r8qyUR/pykwhBWBuFQF1QVH3VuTB6UwXMPY7oaG 3vEPKH3TGbRG3Q5B8awJ//kjJ4uHnu8u8dJdFN2sHIa126PxAQFAdmoo8+2ASp2LupKF HT5D4l54g3LLmV+lDgtqyJpYUeR6deivatJV3BIt6OIpwl+v7en96wNnD9UHOnniHsju sP0A== X-Received: by 10.14.225.199 with SMTP id z47mr3360919eep.24.1380716704803; Wed, 02 Oct 2013 05:25:04 -0700 (PDT) Received: from [192.168.10.48] (93-245-142.netrun.cytanet.com.cy. [93.109.245.142]) by mx.google.com with ESMTPSA id k7sm3248750eeg.13.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Oct 2013 05:25:04 -0700 (PDT) Message-ID: <524C109D.3050603@yandex.ru> Date: Wed, 02 Oct 2013 15:25:01 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> <87wqlzpsj6.fsf@yandex.ru> <524BC9C4.9080301@easy-emacs.de> <87txgz3oo1.fsf@yandex.ru> <524C1061.7010303@easy-emacs.de> In-Reply-To: <524C1061.7010303@easy-emacs.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15251 Cc: 15251@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 02.10.2013 15:24, Andreas Röhler wrote: > Okay, so it got rid of the faces-search? Why don't you look at the source code? `comment-beginning' looks at faces to make sure it's not inside a string, or that the `comment-start-skip' it found doesn't end the comment instead of starting it, in case comment-start and comment-end delimiters are the same. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 02 10:06:04 2013 Received: (at 15251) by debbugs.gnu.org; 2 Oct 2013 14:06:04 +0000 Received: from localhost ([127.0.0.1]:49602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRN40-0005AR-1s for submit@debbugs.gnu.org; Wed, 02 Oct 2013 10:06:04 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:65020) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRN3w-0005A0-Sv for 15251@debbugs.gnu.org; Wed, 02 Oct 2013 10:06:01 -0400 Received: from purzel.sitgens (brln-4d0c0cfb.pool.mediaWays.net [77.12.12.251]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0M9XrD-1VXezx0B03-00CyoZ; Wed, 02 Oct 2013 16:05:59 +0200 Message-ID: <524C28CB.6040406@easy-emacs.de> Date: Wed, 02 Oct 2013 16:08:11 +0200 From: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Dmitry Gutov Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> <87wqlzpsj6.fsf@yandex.ru> <524BC9C4.9080301@easy-emacs.de> <87txgz3oo1.fsf@yandex.ru> <524C1061.7010303@easy-emacs.de> <524C109D.3050603@yandex.ru> In-Reply-To: <524C109D.3050603@yandex.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:ytk+R3lmbFCNJftQoyhwTBEatapRp56XcYNOOevaUTP YHAeT4lNHh64q8utCmoOtSYs4vA/prQwLlxUnIpYuq87GLTDsS A89V/iSqvB62+2yjP3qfIVF5y6WiX9qZyJ8DL12WcbtDLJ0M13 +Jvmg+N0IYzesz4mBfkC+LAKTNIWzlZZyvv6NYbgupCguuIdP4 elK60k0uR+F0aqvv6P8n3Nqe1wOEeuCV8/JPxzgjiqtozMGVZO WcwIiry0w6n1pFCv87zVoY+3n1MPbb1cdzlnc9L+Fr6ErPS84p rpIZ/vN59kOSPv6PXNW6wa5g5av4ezdRnu0XSXB5i282n/GLNw FGNfbtB7etF46LjRfTkk= X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 15251 Cc: 15251@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Am 02.10.2013 14:25, schrieb Dmitry Gutov: > On 02.10.2013 15:24, Andreas Röhler wrote: >> Okay, so it got rid of the faces-search? > > Why don't you look at the source code? > > `comment-beginning' looks at faces to make sure it's not inside a string, Doesn't make sense for me. In which way is a string supposed to bear string-face, if syntax doesn't exist? That's shooting into the dark IMHO. or that the `comment-start-skip' it found doesn't end the comment instead of starting it, in case > comment-start and comment-end delimiters are the same. > Same here. If syntax doesn't exist, only a parser may help. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 03 22:09:28 2013 Received: (at 15251) by debbugs.gnu.org; 4 Oct 2013 02:09:28 +0000 Received: from localhost ([127.0.0.1]:52799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRupb-0007H7-OV for submit@debbugs.gnu.org; Thu, 03 Oct 2013 22:09:28 -0400 Received: from mail-ee0-f53.google.com ([74.125.83.53]:39735) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRupZ-0007Gz-Qx for 15251@debbugs.gnu.org; Thu, 03 Oct 2013 22:09:26 -0400 Received: by mail-ee0-f53.google.com with SMTP id b15so1455186eek.26 for <15251@debbugs.gnu.org>; Thu, 03 Oct 2013 19:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=sioP/kqcfEosZ7rrmtSvtQMOtK03mSz8kZya3zM3zw8=; b=Lf9f/2bKWCHVijpSYez78/blsWCsx4ABOtKoci7o9u2UoxD38P87wslk2BWQRCtFo+ RCBJKSaqejkLRSCUo3S7wY0uSKNZkpW/gxjiELChLXdVjnUcMyIl/Be2tErfpWgmhcey gFpaG4FJuTe0pGlMaDudNwGHHEG5LJ7g38oMFmHh42I5bswFQYzo2mtfd6tnqEf29d/a 3K1Y1IG8WByP9xAuDqVgQKplQGJMNjlB1dFMhBoCkscMMF73Plnz4eMTh4qxhcDShb/t uNPwTkva8GNbu0xaADBRmtjg7rcp/H32yaHzVmt02baQqpRweOj3Ol3Cu/WCyusWSo17 wOxw== X-Received: by 10.14.45.70 with SMTP id o46mr17587829eeb.19.1380852564892; Thu, 03 Oct 2013 19:09:24 -0700 (PDT) Received: from [192.168.10.2] (93-113-74.netrun.cytanet.com.cy. [93.109.113.74]) by mx.google.com with ESMTPSA id h52sm22218242eez.3.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Oct 2013 19:09:24 -0700 (PDT) Message-ID: <524E2351.6050902@yandex.ru> Date: Fri, 04 Oct 2013 05:09:21 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= Subject: Re: bug#15251: 24.3.50; do-auto-fill "continues" comment from inside a string References: <87ioyisnjx.fsf@yandex.ru> <87y56gwa5m.fsf@yandex.ru> <52482759.1070804@easy-emacs.de> <87wqlzpsj6.fsf@yandex.ru> <524BC9C4.9080301@easy-emacs.de> <87txgz3oo1.fsf@yandex.ru> <524C1061.7010303@easy-emacs.de> <524C109D.3050603@yandex.ru> <524C28CB.6040406@easy-emacs.de> In-Reply-To: <524C28CB.6040406@easy-emacs.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15251 Cc: 15251@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 02.10.2013 17:08, Andreas Röhler wrote: > Doesn't make sense for me. In which way is a string supposed to bear > string-face, if syntax doesn't exist? I'm just guessing, but syntax table may have syntax entries for string delimiters, but not for comments (e.g. because their syntax is too weird to be adequately expressed using existing syntax table classes), so comments may be fontified via explicit font-lock-keywords entries. Another option is, like Stefan mentioned, if font-lock-syntax-table is defined, it's used for fontification, and it's very different from the actual buffer syntax table. > That's shooting into the dark IMHO. That code is old. I'm pretty sure nobody would've written it if there weren't any modes in the wild at the time that benefited from it. From unknown Thu Jun 19 13:58:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 01 Nov 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator