From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: myrkraverk@users.sourceforge.net Newsgroups: gmane.emacs.help Subject: Problem with asm-mode-hook Date: Fri, 23 May 2003 05:24:30 +0000 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <16077.45198.883451.24900@jin.tekken> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1053667520 32758 80.91.224.249 (23 May 2003 05:25:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 23 May 2003 05:25:20 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Fri May 23 07:25:19 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19J53O-0008W9-00 for ; Fri, 23 May 2003 07:25:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19J54Z-0005yC-LK for gnu-help-gnu-emacs@m.gmane.org; Fri, 23 May 2003 01:26:31 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19J53k-0005Bg-6G for help-gnu-emacs@gnu.org; Fri, 23 May 2003 01:25:40 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19J52k-0004Dr-Fs for help-gnu-emacs@gnu.org; Fri, 23 May 2003 01:25:09 -0400 Original-Received: from adsl1-61.du.heimsnet.is ([62.145.142.61] helo=jin.tekken) by monty-python.gnu.org with esmtp (Exim 4.20) id 19J52F-0003jH-1Q for help-gnu-emacs@gnu.org; Fri, 23 May 2003 01:24:07 -0400 Original-Received: (from myrkraverk@localhost) by jin.tekken (8.11.6/8.11.6) id h4N5OUi16318; Fri, 23 May 2003 05:24:30 GMT X-Authentication-Warning: jin.tekken: myrkraverk set sender to myrkraverk@users.sourceforge.net using -f Original-To: "Anders K." Original-Newsgroups: gnu.emacs.help In-Reply-To: X-Mailer: VM 7.15 under Emacs 21.3.1 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10081 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10081 Hi, Anders K. writes: > I'm trying to change the assembler mode comment character from ; to #, > so I put this at the end of ~/.emacs: > > (defun my-asm-mode-hook () > (setq asm-comment-char ?#)) > (add-hook 'asm-mode-hook 'my-asm-mode-hook) > > Unfortunately, the change only takes effect starting with the second > assembly file I open. Anyone know why? (I have a similar > c-mode-common-hook that works perfectly.) I've successfully customized this variable to the # char. You may want to try M-x customize-variable RET asm-comment-char RET. Note, for this to work, asm mode has to be loaded already. Note also that asm-mode doesn't insert the # (comment char) into text fields, i.e. quotes sucha as " " and ' '. http://myrkraverk.afraid.org/~myrkraverk/masp-mode.el will do that for you, and I believe the default comment char is #, but I don't remember that actaully. Otherwise it's basically the same as asm-mode. If you don't mind any extra syntax highlight for my preprocessor. Hope this helps, Johann -- This line is left blank intentionally