(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)
(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 ()
(mapcar (lambda (hook) (add-hook hook 'mdw-misc-mode-config))
'(c-mode-hook c++-mode-hook objc-mode-hook java-mode-hook
perl-mode-hook cperl-mode-hook python-mode-hook awk-mode-hook
- tcl-mode-hook
+ tcl-mode-hook asm-mode-hook
TeX-mode-hook LaTeX-mode-hook TeXinfo-mode-hook
tex-mode-hook latex-mode-hook texinfo-mode-hook
emacs-lisp-mode-hook scheme-mode-hook
(add-hook 'objc-mode-hook 'mdw-fontify-c-and-c++ t)
(add-hook 'c++-mode-hook 'mdw-fontify-c-and-c++ t)
(add-hook 'linux-c-mode-hook #'(lambda () (setq c-basic-offset 8)))
+(add-hook 'asm-mode-hook 'mdw-fontify-asm t)
(add-hook 'apcalc-mode-hook 'mdw-misc-mode-config t)
(add-hook 'apcalc-mode-hook 'mdw-fontify-apcalc t)