emacs-devel
[Top][All Lists]
Advanced

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

a label starting from .


From: Masatake YAMATO
Subject: a label starting from .
Date: Fri, 20 Jun 2003 22:48:39 +0900 (JST)

I've added code to support a label starting with "." in asm-mode.el.
Here is the example of assembly language code from sodipodi:

.o_clip:
        addl    $3, %edi
        addl    $4, %esi

        decl    %ebx
        jnz     .o_forx

        movl    20(%ebp), %eax
        addl    %eax, 8(%ebp)
        movl    28(%ebp), %eax
        addl    %eax, 24(%ebp)

        decl    %ecx
        jnz     .o_fory

        jmp .exit

Without my patch .o_clip is not colored in font-lock-mode.
Could I install?

2003-06-20  Masatake YAMATO  <address@hidden>

        * progmodes/asm-mode.el (asm-font-lock-keywords): Support
        a label starting with ".". 


Index: lisp/progmodes/asm-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/asm-mode.el,v
retrieving revision 1.26
diff -u -r1.26 asm-mode.el
--- lisp/progmodes/asm-mode.el  2 Apr 2003 16:44:32 -0000       1.26
+++ lisp/progmodes/asm-mode.el  20 Jun 2003 09:42:30 -0000
@@ -83,6 +83,8 @@
 (defconst asm-font-lock-keywords
  '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ \t]*\\(\\sw+\\(\\.\\sw+\\)*\\)?"
     (1 font-lock-function-name-face) (3 font-lock-keyword-face nil t))
+   ("^\\(\\.\\(\\sw\\|\\s_\\)+\\)\\>:"
+    (1 font-lock-function-name-face))
    ("^\\((\\sw+)\\)?\\s +\\(\\(\\sw\\|\\s_\\)+\\(\\.\\sw+\\)*\\)"
     2 font-lock-keyword-face))
  "Additional expressions to highlight in Assembler mode.")




reply via email to

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