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: Sun, 30 Mar 2003 18:38:20 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20030330.183820.41642342.jet@gyve.org> References: <200301271745.h0RHj6M31730@rum.cs.yale.edu> <20030131.114516.78720099.jet@gyve.org> <200301311324.h0VDOCv25890@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 1049019112 8817 80.91.224.249 (30 Mar 2003 10:11:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 30 Mar 2003 10:11:52 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Mar 30 12:11:51 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18zZn5-0002I4-00 for ; Sun, 30 Mar 2003 12:11:51 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18zZqM-0005g2-00 for ; Sun, 30 Mar 2003 12:15:14 +0200 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 18zZn6-0000YC-00 for emacs-devel@quimby.gnus.org; Sun, 30 Mar 2003 05:11:52 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18zZmO-0008RC-00 for emacs-devel@gnu.org; Sun, 30 Mar 2003 05:11:08 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18zZlt-000869-00 for emacs-devel@gnu.org; Sun, 30 Mar 2003 05:10:37 -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 18zZlg-0007wb-00 for emacs-devel@gnu.org; Sun, 30 Mar 2003 05:10:24 -0500 Original-Received: from localhost (h219-110-074-222.catv01.itscom.jp [219.110.74.222]) by r-maa.spacetown.ne.jp (8.11.6) with ESMTP id h2UAA5C02644; Sun, 30 Mar 2003 19:10:06 +0900 (JST) Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-Reply-To: <200301311324.h0VDOCv25890@rum.cs.yale.edu> X-Mailer: Mew version 3.1.52 on Emacs 21.2 / 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:12748 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12748 Two month ago I posted a patch for asm-mode.el. The patch is reviewed by Stefan Monnier and I got comments. But I could not find time to reflect it to my patch. Now I find time. Masatake YAMATO 2003-03-30 Masatake YAMATO * progmodes/asm-mode.el (asm-mode): supports skpping c lang style comments. Index: progmodes/asm-mode.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/progmodes/asm-mode.el,v retrieving revision 1.23 diff -u -r1.23 asm-mode.el --- progmodes/asm-mode.el 2 Feb 2003 17:34:19 -0000 1.23 +++ progmodes/asm-mode.el 30 Mar 2003 10:01:25 -0000 @@ -140,7 +140,9 @@ (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]*" "\\|" "/\\*+ *")) + (make-local-variable 'comment-end-skip) + (setq comment-end-skip "[ \t]*\\(\\s>\\|\\*+/\\)") (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 " *$")) > > > 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? By reading their docstring: it describes what it should do. Try uncomment-region or comment-kill or auto-fill-mode or ... with various kinds of comments. > - (setq comment-start-skip (concat cs "+[ \t]*")) > + (setq comment-start-skip (concat cs "+[ \t]*" "\\|" "/\\*+ *")) That looks OK. You'll probably need to set comment-end-skip as well: (set (make-local-variable 'comment-end-skip) "[ \t]*\\(\\s>\\|\\*+/\\)") > + (setq comment-multi-line t) This is one is not necessary. Stefan _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel