emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /* */ comments in asm-mode.el


From: Masatake YAMATO
Subject: Re: /* */ comments in asm-mode.el
Date: Fri, 31 Jan 2003 11:45:16 +0900 (JST)

> > 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 " *$"))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]