* Problem with asm-mode-hook
@ 2003-05-23 2:01 Anders K.
2003-05-23 5:24 ` myrkraverk
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Anders K. @ 2003-05-23 2:01 UTC (permalink / raw)
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.)
Anders
^ permalink raw reply [flat|nested] 4+ messages in thread
* Problem with asm-mode-hook
2003-05-23 2:01 Problem with asm-mode-hook Anders K.
@ 2003-05-23 5:24 ` myrkraverk
2003-05-23 5:29 ` myrkraverk
[not found] ` <mailman.6625.1053668066.21513.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: myrkraverk @ 2003-05-23 5:24 UTC (permalink / raw)
Cc: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Problem with asm-mode-hook
2003-05-23 2:01 Problem with asm-mode-hook Anders K.
2003-05-23 5:24 ` myrkraverk
@ 2003-05-23 5:29 ` myrkraverk
[not found] ` <mailman.6625.1053668066.21513.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: myrkraverk @ 2003-05-23 5:29 UTC (permalink / raw)
Cc: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Problem with asm-mode-hook
[not found] ` <mailman.6625.1053668066.21513.help-gnu-emacs@gnu.org>
@ 2003-05-24 3:03 ` Anders K.
0 siblings, 0 replies; 4+ messages in thread
From: Anders K. @ 2003-05-24 3:03 UTC (permalink / raw)
myrkraverk@users.sourceforge.net wrote:
> 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.
Thanks! I didn't install it, but looking at the file, I figured out that
I needed to install an asm-mode-set-comment-hook, not an asm-mode-hook.
It works now.
Anders
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-05-24 3:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-23 2:01 Problem with asm-mode-hook Anders K.
2003-05-23 5:24 ` myrkraverk
2003-05-23 5:29 ` myrkraverk
[not found] ` <mailman.6625.1053668066.21513.help-gnu-emacs@gnu.org>
2003-05-24 3:03 ` Anders K.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).