From unknown Sun Aug 17 09:11:28 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#13585 <13585@debbugs.gnu.org> To: bug#13585 <13585@debbugs.gnu.org> Subject: Status: pascal-mode doesn't recognize all free-pascal comments Reply-To: bug#13585 <13585@debbugs.gnu.org> Date: Sun, 17 Aug 2025 16:11:28 +0000 retitle 13585 pascal-mode doesn't recognize all free-pascal comments reassign 13585 emacs submitter 13585 vrt277 severity 13585 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 29 11:04:26 2013 Received: (at submit) by debbugs.gnu.org; 29 Jan 2013 16:04:26 +0000 Received: from localhost ([127.0.0.1]:54551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0Dfb-0006qJ-6x for submit@debbugs.gnu.org; Tue, 29 Jan 2013 11:04:26 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52990) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U0AxU-0002lU-L7 for submit@debbugs.gnu.org; Tue, 29 Jan 2013 08:10:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0Awp-0001BX-Vo for submit@debbugs.gnu.org; Tue, 29 Jan 2013 08:10:07 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:56109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0Awp-0001BQ-Rf for submit@debbugs.gnu.org; Tue, 29 Jan 2013 08:09:59 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0Awi-00034I-IK for bug-gnu-emacs@gnu.org; Tue, 29 Jan 2013 08:09:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0Awf-00018Y-Fb for bug-gnu-emacs@gnu.org; Tue, 29 Jan 2013 08:09:52 -0500 Received: from mail-lb0-f178.google.com ([209.85.217.178]:59897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0Awf-00018F-4D for bug-gnu-emacs@gnu.org; Tue, 29 Jan 2013 08:09:49 -0500 Received: by mail-lb0-f178.google.com with SMTP id n1so699248lba.37 for ; Tue, 29 Jan 2013 05:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=TkfGW+5eOm9gKXs1Hbe9L7qpvUAv71M9xyp/ejtjxOg=; b=m1vx6kLZfkJ6qzCouRTKkMP3fPSCm2/Dra0d2hgVKEzhBxFunTPHCcsR/LnEF/EbJX eS5jEGxvvH8EKphXp8DUC/3ftu5hyB0VKV9yba+iAtO4GinrhOLR7bcxf37eM6NbsQyO 2WmZ+KfDzw+RnOG66u4z+vNUB8u2uyHFEFkXdiO4J3pRS7Iyvak/46oZx6M6FvE03y2c Pb8hCyJWizQ5IXlFvlgtlYLmMHltFIL8tZE33j5eMHrfOHVV1ZmcSc0x5o615d0+iAbR KbbBHC2RNUhVEoudi4kti4HWAn9JDopEgzdLC1iq1kxuXXWa5LU6g+Cst3hSPcgTINL/ FNqg== X-Received: by 10.112.40.104 with SMTP id w8mr457747lbk.114.1359464987082; Tue, 29 Jan 2013 05:09:47 -0800 (PST) Received: from [192.168.0.100] ([95.154.73.164]) by mx.google.com with ESMTPS id pk1sm4996285lab.0.2013.01.29.05.09.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Jan 2013 05:09:46 -0800 (PST) Message-ID: <5107CA16.5020606@gmail.com> Date: Wed, 30 Jan 2013 00:09:42 +1100 From: vrt277 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: pascal-mode doesn't recognize all free-pascal comments Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 29 Jan 2013 11:04:19 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Hi Emacs developers, pascal-mode from pascal.el doesn't recognize c-style (aka delphi style) one-line comments. ==example // I'm a comment ==example One-line comments is widely used in delphi/freepascal code. Examples can be found in freepascal compiler sources (for example https://github.com/graemeg/freepascal/blob/master/compiler/nflw.pas#L848). (Most ugly thing is that apostrophe symbol inside comment will be recognized as start of string and source code below will be highlighted as string). Information about freepascal comments can be found here: http://www.freepascal.org/docs-html/ref/refse2.html 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. Thanks, Vasiliy K. In GNU Emacs 24.1.1 (i686-pc-linux-gnu, GTK+ Version 2.24.12) of 2012-09-23 on panlong, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11300000 Configured using: `configure '--build' 'i686-linux-gnu' '--build' 'i686-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/i386-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i686-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x s e n d - e m a r e p o r Recent messages: Loading 00debian-vars...done Loading /etc/emacs/site-start.d/50autoconf.el (source)...done Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)... Loading debian-ispell... Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done Loading debian-ispell...done Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: /usr/share/emacs/24.1/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.1/lisp/textmodes/flyspell /usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.1/lisp/textmodes/ispell Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 30 20:03:38 2013 Received: (at 13585) by debbugs.gnu.org; 31 Jan 2013 01:03:39 +0000 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 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" 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 Received: by ceviche.home (Postfix, from userid 20848) id 72B7F66130; Wed, 30 Jan 2013 20:02:56 -0500 (EST) From: Stefan Monnier To: vrt277 Subject: Re: bug#13585: pascal-mode doesn't recognize all free-pascal comments Message-ID: References: <5107CA16.5020606@gmail.com> Date: Wed, 30 Jan 2013 20:02:56 -0500 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) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13585 Cc: 13585@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) > 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) From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 04 02:54:59 2013 Received: (at control) by debbugs.gnu.org; 4 Feb 2013 07:54:59 +0000 Received: from localhost ([127.0.0.1]:35129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2GtH-0002Gn-1C for submit@debbugs.gnu.org; Mon, 04 Feb 2013 02:54:59 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:38695) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U2GtG-0002Gh-AC for control@debbugs.gnu.org; Mon, 04 Feb 2013 02:54:58 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1U2GsE-0004dH-Ok for control@debbugs.gnu.org; Mon, 04 Feb 2013 02:53:54 -0500 Date: Mon, 04 Feb 2013 02:53:54 -0500 Message-Id: Subject: control message for bug 13585 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) close 13585 24.4 From unknown Sun Aug 17 09:11:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 04 Mar 2013 12: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