From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: Configuring asm-mode Date: Thu, 24 Nov 2005 19:17:44 +0100 Organization: Informatimago Message-ID: <878xvd52rb.fsf@thalassa.informatimago.com> References: <87psoqw1ab.fsf@be.cs.appstate.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1132856590 16451 80.91.229.2 (24 Nov 2005 18:23:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 Nov 2005 18:23:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 24 19:23:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EfLiN-0007Qq-RW for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Nov 2005 19:21:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EfLiM-0003yd-Uw for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Nov 2005 13:20:59 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!news.glorb.com!easynet-quince!easynet.net!easynet-post2!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:J2gg8lflYQXVgYCYv2S+ZPrq7SA= Original-Lines: 63 Original-NNTP-Posting-Host: 62.93.174.79 Original-X-Trace: DXC=l0>Rc;PV:nI?;b`^LbBd4DjF1d]A Original-Xref: shelby.stanford.edu gnu.emacs.help:135723 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:31326 Archived-At: Kenneth Jacker writes: > [ I posted this on comp.emacs over a week ago, but got no response(s) ] > [ ... please forgive it you've already seen it! -khj ] > > It appears that the only aspect of 'asm-mode' that is easy to > configure is the "comment character". > > How might I change the default comment and indentation rules? > > Is my only option to modify or override what's in the "asm-mode.el"? Well, when I typed in some 7090 assembler, I wrote my own font-locking and setting tabs and comment character: ;; ... (defun asm7090-font-lock () (interactive) (setq font-lock-defaults nil font-lock-keywords nil) (font-lock-add-keywords nil (list (list (function search-asm7090-fields) ; parses an asm line. '(1 font-lock-function-name-face) ; labels '(2 font-lock-keyword-face) ; operation codes '(3 font-lock-reference-face) ; arguments '(4 font-lock-comment-face) ; comments '(5 font-lock-preprocessor-face) ; ibsys '(6 font-lock-type-face) ; cols 72-80 )))) (defun asm7090 () (interactive) (asm7090-font-lock) (make-local-variable 'tab-stop-list) (setf tab-stop-list '(0 7 15 34 72) asm-comment-char ?*) (local-set-key (kbd "TAB") (function tab-to-tab-stop)) (local-set-key (kbd "RET") (lambda () (interactive) (asm7090-describe-codop) (newline-and-indent))) (font-lock-mode 1) (message "asm7090 activated")) You can fetch it with: cvs -z3 -d :pserver:anonymous@cvs.informatimago.com:/usr/local/cvs/public/chrooted-cvs/cvs co emacs/ http://www.informatimago.com/develop/emacs/index.html -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? __Pascal Bourguignon__ http://www.informatimago.com/