From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bostjan Vilfan Newsgroups: gmane.emacs.help Subject: syntax highlighting Date: Sun, 15 Mar 2015 17:31:58 -0400 Message-ID: <1826912627.26642.1426455118078.JavaMail.help@alum.mit.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_26641_92105381.1426455118077" X-Trace: ger.gmane.org 1426466367 4258 80.91.229.3 (16 Mar 2015 00:39:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Mar 2015 00:39:27 +0000 (UTC) Cc: bjvilfan@gmail.com To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 16 01:39:14 2015 Return-path: Envelope-to: geh-help-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 1YXJ3p-0004RL-0v for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Mar 2015 01:39:13 +0100 Original-Received: from localhost ([::1]:46262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXJ3o-0001TB-8N for geh-help-gnu-emacs@m.gmane.org; Sun, 15 Mar 2015 20:39:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXGge-0005Oc-0T for help-gnu-emacs@gnu.org; Sun, 15 Mar 2015 18:07:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXGgZ-0000uy-0B for help-gnu-emacs@gnu.org; Sun, 15 Mar 2015 18:07:07 -0400 Original-Received: from dmz-mailsec-scanner-5.mit.edu ([18.7.68.34]:46401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXGgY-0000ue-Sc for help-gnu-emacs@gnu.org; Sun, 15 Mar 2015 18:07:02 -0400 X-AuditID: 12074422-f79d16d0000024cf-4d-5505fa50ab23 Original-Received: from mailhub-2.mit.edu ( [18.7.62.30]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP id D0.59.09423.05AF5055; Sun, 15 Mar 2015 17:32:00 -0400 (EDT) Original-Received: from outgoing.mit.edu (outgoing-1.mit.edu [18.9.28.12]) by mailhub-2.mit.edu (8.13.8/8.9.2) with ESMTP id t2FLVxW1023411; Sun, 15 Mar 2015 17:31:59 -0400 Original-Received: from outgoing-alum.mit.edu (outgoing-alum.mit.edu [18.7.68.33]) ) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id t2FLVw57029930; Sun, 15 Mar 2015 17:31:59 -0400 Original-Received: from brunch.MIT.EDU (brunch.mit.edu [18.9.62.90]) by outgoing-alum.mit.edu (8.13.8) with ESMTP id t2FLVw4o007085; Sun, 15 Mar 2015 17:31:58 -0400 Original-Received: from brunch.MIT.EDU (localhost [127.0.0.1]) by brunch.MIT.EDU (8.14.4/8.14.4) with ESMTP id t2FLVwxI057478; Sun, 15 Mar 2015 17:31:58 -0400 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDIsWRmVeSWpSXmKPExsUixG4npxvwizXUYOpvYYsDx5eyWOy8+YbN gclj56y77B5t08wCmKK4bFJSczLLUov07RK4MhY/fs9WsIiz4mTrZ9YGxtPsXYycHBICJhKr tj+FssUkLtxbz9bFyMUhJDCPSaLpxj12CGc5o8SF6bOgnM2MEqfbdzJBOHMZJc6vPsgC4cxk lNh98TdjFyMHB4uAqsTc/Vkgc9kEdCTurboCtkNEQEri/JoTjCA2M9C+WxufsYHYvALuEouW /2MFsYUFZCQed79nhIgLSpyc+YQFoj5E4t+nRSwTGPlnIUnNQpKaBbSZWUBdYv08IYiwvMT2 t3OYFzCyrGKUTcmt0s1NzMwpTk3WLU5OzMtLLdI11cvNLNFLTSndxAgOVBelHYw/DyodYhTg YFTi4f1hwhoqxJpYVlyZe4hRkoNJSZTXZytQiC8pP6UyI7E4I76oNCe1+BCjBAezkggvyzeg HG9KYmVValE+TEqag0VJnHfTD74QIYH0xJLU7NTUgtQimKwMB4eSBG/8T6BGwaLU9NSKtMyc EoQ0EwcnyHAeoOH6IDW8xQWJucWZ6RD5U4yKUuK8k0ASAiCJjNI8uF5YInnFKA70ijDvtB9A VTzAJATX/QpoMBPQ4PrpTCCDSxIRUlINjJU/vyrs3r8zke0019KyxA+WBc5Tet+/1cz3E856 uC51Tu15GcfCs03Wa8772qf+uMgt4PB7le6uAolVARuz38Yq3FpjxTt9+oszsm27mZxszZct VdP5//21mceWkmkx3b6C2XW+GV/uCm5YkxT1+kjh9Alp7fPO1d3fvnK2YvHxsECJ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 18.7.68.34 X-Mailman-Approved-At: Sun, 15 Mar 2015 20:38:56 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103176 Archived-At: ------=_Part_26641_92105381.1426455118077 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello, I am using a derivative of modula2.el (authors: Michael Schmidt Tom Perrine ), which sets up the modula2 mode, and I adapted it for the Oberon2 language. However, I have a problem with syntax highlighting, and since I do not know a lot about the font lock mode, I wonder if someone can give me a quick hint regarding the following problem: I would like to highlight Oberon2 comments, which start with "(*", and end with "*)". Comments can also be recursive; i.e., a comment can look like this: (* bla bla (* bla bla bla *) bla bla *) The way modula2.el is written (or, actually, my derived .el file), the last "bla bla" string is not highlighted. What needs to be done to fix this? Apparently, as things stand now highlighting is turned off as soon as "*)" is encountered. Probably one needs to keep a count of unmatched "(*" strings, and turn highlighting off only when this count reaches 0. Any help would be appreciated. Regards, bostjanv ------=_Part_26641_92105381.1426455118077--