From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r116779: Restore compatibility with legacy comment-start-skip values Date: Mon, 17 Mar 2014 14:14:29 -0400 Message-ID: References: <53271F7F.8070308@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395080283 2512 80.91.229.3 (17 Mar 2014 18:18:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Mar 2014 18:18:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 17 19:18:10 2014 Return-path: Envelope-to: ged-emacs-devel@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 1WPc6z-00082r-R5 for ged-emacs-devel@m.gmane.org; Mon, 17 Mar 2014 19:18:09 +0100 Original-Received: from localhost ([::1]:59524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPc6z-0005Er-Cv for ged-emacs-devel@m.gmane.org; Mon, 17 Mar 2014 14:18:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPc3a-0000Ap-1j for emacs-devel@gnu.org; Mon, 17 Mar 2014 14:14:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPc3S-00023x-OZ for emacs-devel@gnu.org; Mon, 17 Mar 2014 14:14:37 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:28889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPc3S-00023n-Ky for emacs-devel@gnu.org; Mon, 17 Mar 2014 14:14:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KKg/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDjhiWYoFegxM X-IPAS-Result: Av4EABK/CFHO+KKg/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDjhiWYoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="52371303" Original-Received: from 206-248-162-160.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.160]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 17 Mar 2014 14:14:29 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 8D1C7602B7; Mon, 17 Mar 2014 14:14:29 -0400 (EDT) In-Reply-To: <53271F7F.8070308@yandex.ru> (Dmitry Gutov's message of "Mon, 17 Mar 2014 18:14:55 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:170456 Archived-At: >>> + (save-excursion >>> + (forward-char -1) >>> + (looking-at comment-start-skip))) >> This needs to additionally check that (match-end 1) points to what we >> thought was the comment start. > Can you think of a situation when that's not true? "Think of", no. But I can make one up, if you want ;-) BTW, the new code still will fail to match the ";hello" comment in foo\\;hello Maybe we should use narrow-to-region to get the ^ part of the regexp to match at point. > And suppose it doesn't, then what? Admittedly, I'm not sure how to handle the more general case where comment-start-skip uses sub-group 1 for something more significant than to rule out an escape char. Stefan