Install configuration for `mg' editor.
[profile] / dot-emacs.el
index 4780435..74eb428 100644 (file)
@@ -489,11 +489,14 @@ doesn't cope with anything approximating a complicated case."
   (and mdw-auto-indent
        (cond ((eq major-mode 'lisp-mode)
              (local-set-key "\C-m" 'mdw-indent-newline-and-indent))
-            ((eq major-mode 'slime-repl-mode) nil)
+            ((or (eq major-mode 'slime-repl-mode)
+                 (eq major-mode 'asm-mode))
+             nil)
             (t
              (local-set-key "\C-m" 'newline-and-indent))))
   (local-set-key [C-return] 'newline)
-  (local-set-key [?\;] 'self-insert-command)
+  (or (eq major-mode 'asm-mode)
+      (local-set-key [?\;] 'self-insert-command))
   (local-set-key [?\#] 'self-insert-command)
   (local-set-key [?\"] 'self-insert-command)
   (setq comment-column 40)
@@ -638,8 +641,6 @@ doesn't cope with anything approximating a complicated case."
   (setq c-hanging-comment-ender-p nil)
   (setq c-backslash-column 72)
   (setq c-label-minimum-indentation 0)
-  (setq comment-start "/* ")
-  (setq comment-end " */")
   (setq mdw-fill-prefix
        `((,(concat "\\([ \t]*/?\\)"
                    "\\([\*/][ \t]*\\)"
@@ -652,12 +653,12 @@ doesn't cope with anything approximating a complicated case."
   (make-local-variable 'font-lock-keywords)
   (let ((c-keywords
         (make-regexp '(
-                       ;; "and"        ;C++
-                       ;; "and_eq"     ;C++
+                       "and"           ;C++
+                       "and_eq"        ;C++
                        "asm"           ;K&R, GCC
                        "auto"          ;K&R, C89
-                       ;; "bitand"     ;C++
-                       ;; "bitor"      ;C++
+                       "bitand"        ;C++
+                       "bitor"         ;C++
                        "bool"          ;C++, C9X macro
                        "break"         ;K&R, C89
                        "case"          ;K&R, C89
@@ -665,7 +666,7 @@ doesn't cope with anything approximating a complicated case."
                        "char"          ;K&R, C89
                        "class"         ;C++
                        "complex"       ;C9X macro, C++ template type
-                       ;; "compl"      ;C++
+                       "compl"         ;C++
                        "const"         ;C89
                        "const_cast"    ;C++
                        "continue"      ;K&R, C89
@@ -679,12 +680,12 @@ doesn't cope with anything approximating a complicated case."
                        ;; "entry"      ;K&R -- never used
                        "enum"          ;C89
                        "explicit"      ;C++
-                       ;; "export"     ;C++
+                       "export"        ;C++
                        "extern"        ;K&R, C89
                        "false"         ;C++, C9X macro
                        "float"         ;K&R, C89
                        "for"           ;K&R, C89
-                       "fortran"       ;K&R
+                       ;; "fortran"    ;K&R
                        "friend"        ;C++
                        "goto"          ;K&R, C89
                        "if"            ;K&R, C89
@@ -696,8 +697,8 @@ doesn't cope with anything approximating a complicated case."
                        "namespace"     ;C++
                        "new"           ;C++
                        "operator"      ;C++
-                       ;; "or"         ;C++
-                       ;; "or_eq"      ;C++
+                       "or"            ;C++
+                       "or_eq"         ;C++
                        "private"       ;C++
                        "protected"     ;C++
                        "public"        ;C++
@@ -730,8 +731,8 @@ doesn't cope with anything approximating a complicated case."
                        "volatile"      ;C89
                        "wchar_t"       ;C++, C89 library type
                        "while"         ;K&R, C89
-                       ;; "xor"        ;C++
-                       ;; "xor_eq"     ;C++
+                       "xor"           ;C++
+                       "xor_eq"        ;C++
                        "_Bool"         ;C9X
                        "_Complex"      ;C9X
                        "_Imaginary"    ;C9X
@@ -1298,6 +1299,14 @@ strip numbers instead."
 
   (run-hooks 'arm-assembler-mode-hook))
 
+;;;----- Assembler mode -----------------------------------------------------
+
+(defun mdw-fontify-asm ()
+  (modify-syntax-entry ?' "\"")
+  (modify-syntax-entry ?. "w")
+  (setf fill-prefix nil)
+  (mdw-standard-fill-prefix "\\([ \t]*;+[ \t]*\\)"))
+
 ;;;----- TCL configuration --------------------------------------------------
 
 (defun mdw-fontify-tcl ()