From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Masatake YAMATO Newsgroups: gmane.emacs.devel Subject: Re: /* */ comments in asm-mode.el Date: Fri, 31 Jan 2003 11:45:16 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20030131.114516.78720099.jet@gyve.org> References: <20030122.141017.30187991.jet@gyve.org> <200301271745.h0RHj6M31730@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1043986073 2976 80.91.224.249 (31 Jan 2003 04:07:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 31 Jan 2003 04:07:53 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18eSSz-0000ln-00 for ; Fri, 31 Jan 2003 05:07:49 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18eSYx-0002hM-00 for ; Fri, 31 Jan 2003 05:13:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18eSTM-0001R9-0A for emacs-devel@quimby.gnus.org; Thu, 30 Jan 2003 23:08:12 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18eST6-0001Qb-00 for emacs-devel@gnu.org; Thu, 30 Jan 2003 23:07:56 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18eST5-0001QC-00 for emacs-devel@gnu.org; Thu, 30 Jan 2003 23:07:56 -0500 Original-Received: from r-maa.spacetown.ne.jp ([210.130.136.40]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18eST4-0001Pv-00 for emacs-devel@gnu.org; Thu, 30 Jan 2003 23:07:54 -0500 Original-Received: from localhost (h219-110-074-175.catv01.itscom.jp [219.110.74.175]) by r-maa.spacetown.ne.jp (8.11.6) with ESMTP id h0V47nY23561; Fri, 31 Jan 2003 13:07:50 +0900 (JST) Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-Reply-To: <200301271745.h0RHj6M31730@rum.cs.yale.edu> X-Mailer: Mew version 3.1.52 on Emacs 21.3 / Mule 5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11248 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11248 > > gas supprots /* comment */ style comment. However, asm-mode supports only > > ; comment > > style comment. Therefore the buffer coloring done by font-lock is not > > beautiful. Here I've added /* comment */ style comment support. > > You'll also want to update comment-start, comment-start-skip, > comment-end (and maybe comment-end-skip) accordingly. I've tried. However, I don't know this is correct code or not. How could I check the values of comment-start-skip and its friends are correct or not? What I did is just copying code from cc-mode.el that supports both comment style `/* */' and `// '. Masatake YAMATO Index: lisp/progmodes/asm-mode.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/progmodes/asm-mode.el,v retrieving revision 1.22 diff -u -r1.22 asm-mode.el --- lisp/progmodes/asm-mode.el 23 Jan 2003 09:11:46 -0000 1.22 +++ lisp/progmodes/asm-mode.el 31 Jan 2003 04:03:59 -0000 @@ -139,7 +154,8 @@ (make-local-variable 'comment-start) (setq comment-start (concat (char-to-string asm-comment-char) " ")) (make-local-variable 'comment-start-skip) - (setq comment-start-skip (concat cs "+[ \t]*")) + (setq comment-start-skip (concat cs "+[ \t]*" "\\|" "/\\*+ *")) + (setq comment-multi-line t) (setq asm-inline-empty-comment-pattern (concat "^.+" cs "+ *$")) (setq asm-code-level-empty-comment-pattern (concat "^[\t ]+" cs cs " *$")) (setq asm-flush-left-empty-comment-pattern (concat "^" cs cs cs " *$"))