From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#14434: 24.3; lisp mode's comment start seems bad Date: Wed, 22 May 2013 08:15:53 +0200 Message-ID: <519C6299.4070706@easy-emacs.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1369203279 6066 80.91.229.3 (22 May 2013 06:14:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 May 2013 06:14:39 +0000 (UTC) To: 14434@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 22 08:14:34 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 1Uf2Jl-0000pK-Jm for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 May 2013 08:14:33 +0200 Original-Received: from localhost ([::1]:41899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf2Jl-0007jC-5K for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 May 2013 02:14:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf2Je-0007ir-2w for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 02:14:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf2JX-0005BA-Nn for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 02:14:26 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf2JX-0005Ax-Kf for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 02:14:19 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Uf2KE-0006lJ-01 for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 02:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 May 2013 06:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14434 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136920326525904 (code B ref -1); Wed, 22 May 2013 06:15:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 May 2013 06:14:25 +0000 Original-Received: from localhost ([127.0.0.1]:55614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uf2Jd-0006jl-2g for submit@debbugs.gnu.org; Wed, 22 May 2013 02:14:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55712) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uf2Ja-0006jP-A9 for submit@debbugs.gnu.org; Wed, 22 May 2013 02:14:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf2Ij-000534-V0 for submit@debbugs.gnu.org; Wed, 22 May 2013 02:13:34 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:51318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf2Ij-00052y-Rn for submit@debbugs.gnu.org; Wed, 22 May 2013 02:13:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf2If-0007Yy-6B for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 02:13:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf2Ia-000514-JI for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 02:13:25 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.171]:59693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf2Ia-00050t-Ab for bug-gnu-emacs@gnu.org; Wed, 22 May 2013 02:13:20 -0400 Original-Received: from [192.168.178.21] (brln-4db9ef0f.pool.mediaWays.net [77.185.239.15]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0Lxdlr-1UQWRC2Iqh-017HEF; Wed, 22 May 2013 08:13:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 In-Reply-To: X-Provags-ID: V02:K0:ZNZD92xY7eUsT0iOwi1soUNh9i39STtqfpWsZ3eFdlA y+l2PA5LrtuJUgvwksDY+9bk3RuAn24cYb33YhBQqDABMPAfW/ EVADxeCeq0F3wlqwgDO7NAdeuhgJk3egwP+Aa+oBpVT7CkXRw4 KEloDjmDITTjlfp7uxxXznlsZlZFjIvLFN5EYGeXYCmZTkOYIP epNqSJGcT9GfcWsu/+9F7zXmn4ujSLyfStg+P8EZTb/2Uy9p2I 7arIxsto2RyTmT9hJ3utdD8is5jps9/e+dBxw3oEIZpIS+NLW+ gMzWA/cINj/UbIZNI7bVgnU/TjvInOEp7QdCpBYGA6rxTmIRca lKoXc+9iqyjNrB2AGx21u/HRDJ+7M9hs059hxINMI 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: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:74442 Archived-At: Am 22.05.2013 06:26, schrieb Leo Liu: > After fixing bug#14303, we can observe the following bug: > > 1. Emacs -q > 2. insert in a emacs lisp mode buffer: > ( > ;; > ) > 3. Move point to be end of ;; > 4. M-j > > You should see: > > ( > ;; > ; > ) > > This seems to be due to bad comment-start-skip. Is the following fix correct? > > --- lisp/emacs-lisp/lisp-mode.el.gz > +++ # > @@ -219,7 +219,7 @@ > (make-local-variable 'comment-start-skip) > ;; Look within the line for a ; following an even number of backslashes > ;; after either a non-backslash or the line beginning. > - (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") > + (setq comment-start-skip "\\(\\(^\\|[^\\\\\n;]\\)\\(\\\\\\\\\\)*\\);+ *") > (make-local-variable 'font-lock-comment-start-skip) > ;; Font lock mode uses this only when it KNOWS a comment is starting. > (setq font-lock-comment-start-skip ";+ *") > > Diff finished. Wed May 22 12:24:18 2013 > > > > Maybe it would be worth to re-consider that comment-start-skip. What about to drop it? All we need is the position of comment start and it's end. What to do with code before resp. after, let the modes decide. AFAIU you can't check for an even number of backslashes with a regexp, never. So that will remain buggy. Cheers, andreas