Add (mips|haxor|nasm)-mode to module-asm.el

This commit is contained in:
Henrik Lissner 2016-09-09 19:26:21 +02:00
parent 9f4bcf3bf2
commit a39c79abd8
2 changed files with 10 additions and 15 deletions

5
Cask
View file

@ -142,6 +142,11 @@
;;;; MODULES ;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Assembly -- modules/module-asm.el
(depends-on "mips-mode")
(depends-on "haxor-mode")
(depends-on "nasm-mode")
;; C/C++ -- modules/module-cc.el
(depends-on "cmake-mode")
(depends-on "company-irony")

View file

@ -1,20 +1,10 @@
;;; 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))))
(use-package mips-mode :mode "\\.mips$")
(use-package haxor-mode :mode "\\.hax$")
(use-package nasm-mode :defer t)
(provide 'module-asm)
;;; module-asm.el ends here