;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:24:49 2007 ;;; from file /home/cyd/emacs/lisp/progmodes/asm-mode.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`asm-mode.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-declare-group 'asm nil "Mode for editing assembler code." :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) :group 'languages) #@51 *The comment-start character assumed by Asm mode. (custom-declare-variable 'asm-comment-char '59 '(#$ . -730) :type 'character :group 'asm) #@38 Syntax table used while in Asm mode. (defvar asm-mode-syntax-table (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210)\207" [st make-syntax-table modify-syntax-entry 10 "> b" 47 ". 124b" 42 ". 23"] 4) (#$ . 876)) #@38 Abbrev table used while in Asm mode. (defvar asm-mode-abbrev-table nil (#$ . 1118)) (define-abbrev-table 'asm-mode-abbrev-table nil) #@22 Keymap for Asm mode. (defvar asm-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\310#\210)\207" [map make-sparse-keymap define-key ":" asm-colon ";" comment-region "\n" newline-and-indent " "] 4) (#$ . 1257)) #@56 Additional expressions to highlight in Assembler mode. (defconst asm-font-lock-keywords (append '(("^\\(\\(\\sw\\|\\s_\\)+\\)\\>:?[ ]*\\(\\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) ("^\\(\\.\\(\\sw\\|\\s_\\)+\\)\\>[^:]?" 1 font-lock-keyword-face) ("%\\sw+" . font-lock-variable-name-face)) cpp-font-lock-keywords) (#$ . 1517)) #@675 Major mode for editing typical assembler code. Features a private abbrev table and the following bindings: \[asm-colon] outdent a preceding label, tab to next tab stop. \[tab-to-tab-stop] tab to next tab stop. \[asm-newline] newline, then tab to next tab stop. \[asm-comment] smart placement of assembler comments. The character used for making comments is set by the variable `asm-comment-char' (which defaults to `?\;'). Alternatively, you may set this variable in `asm-mode-set-comment-hook', which is called near the beginning of mode initialization. Turning on Asm mode runs the hook `asm-mode-hook' at the end of initialization. Special commands: \{asm-mode-map} (defalias 'asm-mode #[nil "\306 \210\307\310\n\311\304!\210\312\311\305!\210\313\311\314!\210\315\f\316\317!\210\320\321 &\244!\210\322\323'!\324\"\210\325\326(!!\210\327'\330\"\210\311\331!\210\332'!\311\333!\210\334\311\335!\210\336\311\337!\210\340\311\341!\210\342!\343)\344\345!\207" [mode-name major-mode asm-mode-abbrev-table local-abbrev-table font-lock-defaults indent-line-function kill-all-local-variables "Assembler" asm-mode make-local-variable (asm-font-lock-keywords) asm-indent-line tab-always-indent nil run-hooks asm-mode-set-comment-hook use-local-map make-sparse-keymap local-set-key vector asm-comment set-syntax-table make-syntax-table modify-syntax-entry "< b" comment-start string comment-add 1 comment-start-skip "\\(?:\\s<+\\|/[/*]+\\)[ ]*" comment-end-skip "[ ]*\\(\\s>\\|\\*+/\\)" comment-end "" " " run-mode-hooks asm-mode-hook asm-mode-map asm-comment-char asm-mode-syntax-table fill-prefix] 3 (#$ . 2062) nil]) #@31 Auto-indent the current line. (defalias 'asm-indent-line #[nil "`\302\303\304\217\203\212\305 !)\202\305 !*\207" [savep indent nil (byte-code "\212\301y\210\302\303w\210`Y\203\303\304 \301])\207" [savep 0 " " nil asm-calculate-indentation] 2) ((error 0)) indent-line-to] 3 (#$ . 3707) nil]) (defalias 'asm-calculate-indentation #[nil "\303\304!\203\305\207\303\306!\203\305\207\303\307!\203\206 @\206 \n\207" [comment-column tab-stop-list tab-width looking-at "\\(\\sw\\|\\s_\\)+:" 0 "\\s<\\s<\\s<" "\\s<\\(\\S<\\|\\'\\)"] 2]) #@72 Insert a colon; if it follows a label, delete the label's indentation. (defalias 'asm-colon #[nil "\301\212\302\303!\210\302\304!\210n\211\203\305 \210)\306\307!\210\205\"\305 \210\310 )\207" [labelp nil skip-syntax-backward "w_" " " delete-horizontal-space call-interactively self-insert-command tab-to-tab-stop] 2 (#$ . 4262) nil]) (defalias 'asm-newline 'newline-and-indent) #@414 Convert an empty comment to a `larger' kind, or start a new one. These are the known comment classes: 1 -- comment to the right of the code (at the comment-column) 2 -- comment on its own line, indented like code 3 -- comment on its own line, beginning at the left-most column. Suggested usage: while writing your code, trigger asm-comment repeatedly until you are satisfied with the kind of comment. (defalias 'asm-comment #[nil "\303 \210\304\211\212\305 \210\306\307 \310\"\311\312!)\212\305 \210\311\313!)\203,\314 \210\n\211\315\261\202|\2036`W\203;\316 \202| \203H\212b\210n)\203M\nc\202|\212b\210\317\304x\210n)\203eb\210\nc\210\316 \202|b\210\317\304x\210`\307 |\210\305 \210\320c\210\321u\210\322 *\207" [comment comempty asm-comment-char comment-normalize-vars nil beginning-of-line comment-search-forward line-end-position t looking-at "[ ]*$" "^[ ]*$" indent-according-to-mode 32 indent-for-comment " " "\n" -1 asm-comment] 3 (#$ . 4653) nil]) (provide 'asm-mode)