Add module-asm.el

This commit is contained in:
Henrik Lissner 2016-09-08 01:03:39 +02:00
parent 29616b02d3
commit 84448c77fa
2 changed files with 21 additions and 0 deletions

20
modules/module-asm.el Normal file
View file

@ -0,0 +1,20 @@
;;; module-asm.el
(use-package asm-mode
:commands (mips-mode)
:mode ("\\.mips" . mips-mode)
:config
(define-derived-mode mips-mode asm-mode "MIPS"
"Major mode for editing MIPS assembler code."
;; Unset ; key.
(local-unset-key (vector asm-comment-char))
(set (make-local-variable #'asm-comment-char) ?#)
(local-set-key (vector asm-comment-char) #'asm-comment)
;; Update syntax for new comment char.
(set-syntax-table (make-syntax-table asm-mode-syntax-table))
(modify-syntax-entry asm-comment-char "< b")
;; Fix one level comments.
(set (make-local-variable #'comment-start) (string asm-comment-char)))
(provide 'module-asm)
;;; module-asm.el ends here