From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Arjan Bos Newsgroups: gmane.emacs.help Subject: syntax table entries for comments Date: Mon, 08 Sep 2003 07:39:08 +0200 Organization: Wanadoo Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3f5db647$0$35674$1b62eedf@news.wanadoo.nl> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1063109397 8409 80.91.224.253 (9 Sep 2003 12:09:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Sep 2003 12:09:57 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 09 14:09:55 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19whJi-000224-00 for ; Tue, 09 Sep 2003 14:09:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19whFl-0007cq-UQ for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Sep 2003 08:05:49 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!news2.euro.net!postnews1.euro.net!news.wanadoo.nl!not-for-mail User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Date: 09 Sep 2003 11:15:20 GMT Original-NNTP-Posting-Host: rot2-p0081.dial.wanadoo.nl Original-X-Trace: 1063106120 maya.euronet.nl 35674 62.234.198.81:28682 Original-X-Complaints-To: abuse@wanadoo.nl Original-Xref: shelby.stanford.edu gnu.emacs.help:116458 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:12377 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12377 Hi all, First of, many thanks to those who answered my question about info for major-mode writers. The mode tutorial on emacs wiki was most enlightning. In fact it was so helpful, that I decided to completely rewrite the major-mode for NetRexx. When it's done I'll post it in gnu.emacs.sources. But before that can happen, I'll need some clues. NetRexx is a programming language that contains two types of comments. The first is for large blocks and is the familiar /* */ construction. This I can do by looking at the examples. The second one is a single-line comment that consists of two hyphens, like: -- this is a comment. Based on the major mode tutorial I did put the following code in: (defvar nrx-mode-syntax-table nil "Syntax table in use in NRX-mode buffers.") (defun nrx-create-syntax-table () (if nrx-mode-syntax-table () (setq nrx-mode-syntax-table (make-syntax-table)) (modify-syntax-entry ?. "." nrx-mode-syntax-table) (modify-syntax-entry ?- ". 12b" nrx-mode-syntax-table) (modify-syntax-entry ?/ ". 14" nrx-mode-syntax-table) (modify-syntax-entry ?* ". 23" nrx-mode-syntax-table) (modify-syntax-entry ?\n "> b" nrx-mode-syntax-table) (modify-syntax-entry ?\' "\"" nrx-mode-syntax-table)) (set-syntax-table nrx-mode-syntax-table)) This works but also renders the combination -* and *- as comment start and end, which is wrong. Could anyone please tell me what I'm missing? TIA, Arjan