[Top][All Lists]
[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: |
Sun, 30 Mar 2003 18:38:20 +0900 (JST) |
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 <address@hidden>
* 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
address@hidden
http://mail.gnu.org/mailman/listinfo/emacs-devel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: /* */ comments in asm-mode.el,
Masatake YAMATO <=