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#13585: pascal-mode doesn't recognize all free-pascal comments Date: Wed, 30 Jan 2013 20:02:56 -0500 Message-ID: References: <5107CA16.5020606@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1359594212 4355 80.91.229.3 (31 Jan 2013 01:03:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Jan 2013 01:03:32 +0000 (UTC) Cc: 13585@debbugs.gnu.org To: vrt277 Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 31 02:03:52 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 1U0iZ8-0000oF-I5 for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Jan 2013 02:03:46 +0100 Original-Received: from localhost ([::1]:49032 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0iYq-0002S4-B1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Jan 2013 20:03:28 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0iYn-0002Rd-NI for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 20:03:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0iYl-0003kJ-Nw for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 20:03:25 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0iYl-0003kB-LO for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 20:03:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U0iZO-0004LC-Dt for bug-gnu-emacs@gnu.org; Wed, 30 Jan 2013 20:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Jan 2013 01:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13585-submit@debbugs.gnu.org id=B13585.135959421916657 (code B ref 13585); Thu, 31 Jan 2013 01:04:02 +0000 Original-Received: (at 13585) by debbugs.gnu.org; 31 Jan 2013 01:03:39 +0000 Original-Received: from localhost ([127.0.0.1]:56484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0iZ0-0004KY-DB for submit@debbugs.gnu.org; Wed, 30 Jan 2013 20:03:38 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:48662) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0iYy-0004KR-HN for 13585@debbugs.gnu.org; Wed, 30 Jan 2013 20:03:36 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFG4rw3e/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IPAS-Result: Av8EABK/CFG4rw3e/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="74599" Original-Received: from 184-175-13-222.dsl.teksavvy.com (HELO ceviche.home) ([184.175.13.222]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Jan 2013 20:02:56 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 72B7F66130; Wed, 30 Jan 2013 20:02:56 -0500 (EST) In-Reply-To: <5107CA16.5020606@gmail.com> (vrt's message of "Wed, 30 Jan 2013 00:09:42 +1100") 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.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:70511 Archived-At: > Nowday freepascal is one of most widely used pascal compilers (after > Delphi). Although delphi-mode doesn't have described problem I thiks > if there is separate pascal-mode it should work good. So problem > should be fixed. Indeed, I even extended the syntax-table facility so as to be able to properly support the many different comment styles in Pascal. I installed the patch below, which should do what you asked for. I hope someone can try and merge delphi.el and pascal.el. It can be done step by step, e.g. by first making delphi.el a derived mode of pascal.el and then moving delphi.el code to pascal.el bit by bit. Stefan === modified file 'lisp/progmodes/pascal.el' --- lisp/progmodes/pascal.el 2013-01-01 09:11:05 +0000 +++ lisp/progmodes/pascal.el 2013-01-31 00:56:19 +0000 @@ -138,6 +138,9 @@ ;; find about the syntax of Pascal's comments said that (* ... } is ;; a valid comment, just as { ... *) or (* ... *) or { ... }. (modify-syntax-entry ?* ". 23" st) + ;; Allow //...\n comments as accepted by Free Pascal. + (modify-syntax-entry ?/ ". 12c" st) + (modify-syntax-entry ?\n "> c" st) (modify-syntax-entry ?{ "<" st) (modify-syntax-entry ?} ">" st) (modify-syntax-entry ?+ "." st)