128 |
(local-set-key (vector asm-comment-char) 'asm-comment) |
(local-set-key (vector asm-comment-char) 'asm-comment) |
129 |
|
|
130 |
(modify-syntax-entry asm-comment-char |
(modify-syntax-entry asm-comment-char |
131 |
"<" asm-mode-syntax-table) |
"< b" asm-mode-syntax-table) |
132 |
(modify-syntax-entry ?\n |
(modify-syntax-entry ?\n |
133 |
">" asm-mode-syntax-table) |
"> b" asm-mode-syntax-table) |
134 |
|
|
135 |
|
(modify-syntax-entry ?/ ". 14" asm-mode-syntax-table) |
136 |
|
(modify-syntax-entry ?* ". 23" asm-mode-syntax-table) |
137 |
|
|
138 |
(let ((cs (regexp-quote (char-to-string asm-comment-char)))) |
(let ((cs (regexp-quote (char-to-string asm-comment-char)))) |
139 |
(make-local-variable 'comment-start) |
(make-local-variable 'comment-start) |
140 |
(setq comment-start (concat (char-to-string asm-comment-char) " ")) |
(setq comment-start (concat (char-to-string asm-comment-char) " ")) |
217 |
(insert asm-comment-char)) |
(insert asm-comment-char)) |
218 |
|
|
219 |
;; Empty code-level comment already present? |
;; Empty code-level comment already present? |
220 |
;; Then start flush-left comment, on line above if this one is nonempty. |
;; Then start flush-left comment, on line above if this one is nonempty. |
221 |
((asm-line-matches asm-code-level-empty-comment-pattern) |
((asm-line-matches asm-code-level-empty-comment-pattern) |
222 |
(asm-pop-comment-level) |
(asm-pop-comment-level) |
223 |
(insert asm-comment-char asm-comment-char comment-start)) |
(insert asm-comment-char asm-comment-char comment-start)) |
224 |
|
|
225 |
;; Empty comment ends line? |
;; Empty comment ends line? |
226 |
;; Then make code-level comment, on line above if this one is nonempty. |
;; Then make code-level comment, on line above if this one is nonempty. |
227 |
((asm-line-matches asm-inline-empty-comment-pattern) |
((asm-line-matches asm-inline-empty-comment-pattern) |
228 |
(asm-pop-comment-level) |
(asm-pop-comment-level) |
229 |
(tab-to-tab-stop) |
(tab-to-tab-stop) |