unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* asm mode doesn't recognize gas comments...
@ 2010-01-23 10:09 Brendan Miller
  2010-01-23 14:15 ` Andreas Politz
  0 siblings, 1 reply; 5+ messages in thread
From: Brendan Miller @ 2010-01-23 10:09 UTC (permalink / raw)
  To: help-gnu-emacs

By default it seems that asm mode recognizes MASM style comments
(starting with ;), but not gas style comments (starting with #). A
little weird for a GNU program running on Linux...

Anyway, according to asm modes docs:
http://www.phys.ufl.edu/docs/emacs/emacs_299.html

asm-comment-char can be set. So I added this to my .emacs:

(set 'asm-comment-char "#")

This makes ; stop highlighting like a comment, but doesn't make # do
anything. Am I doing anything obviously wrong? Is there some mode file
somewhere that actually handles the GNU assembler syntax?

Brendan




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: asm mode doesn't recognize gas comments...
  2010-01-23 10:09 asm mode doesn't recognize gas comments Brendan Miller
@ 2010-01-23 14:15 ` Andreas Politz
  2010-01-23 14:18   ` Andreas Politz
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Politz @ 2010-01-23 14:15 UTC (permalink / raw)
  To: help-gnu-emacs

Brendan Miller <catphive@catphive.net> writes:

> By default it seems that asm mode recognizes MASM style comments
> (starting with ;), but not gas style comments (starting with #). A
> little weird for a GNU program running on Linux...
>
> Anyway, according to asm modes docs:
> http://www.phys.ufl.edu/docs/emacs/emacs_299.html
>
> asm-comment-char can be set. So I added this to my .emacs:
>
> (set 'asm-comment-char "#")
>
> This makes ; stop highlighting like a comment, but doesn't make # do
> anything. Am I doing anything obviously wrong? Is there some mode file
> somewhere that actually handles the GNU assembler syntax?
>
> Brendan

(setq asm-comment-char ?#)

It think it has to be a character (not a string).

-ap





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: asm mode doesn't recognize gas comments...
  2010-01-23 14:15 ` Andreas Politz
@ 2010-01-23 14:18   ` Andreas Politz
  2010-01-23 18:22     ` Brendan Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Politz @ 2010-01-23 14:18 UTC (permalink / raw)
  To: help-gnu-emacs

Andreas Politz <politza@fh-trier.de> writes:

> Brendan Miller <catphive@catphive.net> writes:
>
>> By default it seems that asm mode recognizes MASM style comments
>> (starting with ;), but not gas style comments (starting with #). A
>> little weird for a GNU program running on Linux...
>>
>> Anyway, according to asm modes docs:
>> http://www.phys.ufl.edu/docs/emacs/emacs_299.html
>>
>> asm-comment-char can be set. So I added this to my .emacs:
>>
>> (set 'asm-comment-char "#")
>>
>> This makes ; stop highlighting like a comment, but doesn't make # do
>> anything. Am I doing anything obviously wrong? Is there some mode file
>> somewhere that actually handles the GNU assembler syntax?
>>
>> Brendan
>
> (setq asm-comment-char ?#)
>
> It think it has to be a character (not a string).
>
> -ap

(setq asm-comment-char ?\#)

Better escape the lisp comment char.

-ap





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: asm mode doesn't recognize gas comments...
  2010-01-23 14:18   ` Andreas Politz
@ 2010-01-23 18:22     ` Brendan Miller
  0 siblings, 0 replies; 5+ messages in thread
From: Brendan Miller @ 2010-01-23 18:22 UTC (permalink / raw)
  To: Andreas Politz; +Cc: help-gnu-emacs

On Sat, Jan 23, 2010 at 6:18 AM, Andreas Politz <politza@fh-trier.de> wrote:
> Andreas Politz <politza@fh-trier.de> writes:
>>>
>>> Brendan
>>
>> (setq asm-comment-char ?#)
>>
>> It think it has to be a character (not a string).
>>
>> -ap
>
> (setq asm-comment-char ?\#)
>
> Better escape the lisp comment char.
>
> -ap
>
>
>
>

Ah! That works thanks!




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: asm mode doesn't recognize gas comments...
       [not found] <mailman.57.1264241362.14305.help-gnu-emacs@gnu.org>
@ 2010-01-26  3:14 ` rustom
  0 siblings, 0 replies; 5+ messages in thread
From: rustom @ 2010-01-26  3:14 UTC (permalink / raw)
  To: help-gnu-emacs

On Jan 23, 3:09 pm, Brendan Miller <catph...@catphive.net> wrote:
> By default it seems that asm mode recognizes MASM style comments
> (starting with ;), but not gas style comments (starting with #). A
> little weird for a GNU program running on Linux...
>
> Anyway, according to asm modes docs:http://www.phys.ufl.edu/docs/emacs/emacs_299.html98
>
> asm-comment-char can be set. So I added this to my .emacs:
>
> (set 'asm-comment-char "#")
>
> This makes ; stop highlighting like a comment, but doesn't make # do
> anything. Am I doing anything obviously wrong? Is there some mode file
> somewhere that actually handles the GNU assembler syntax?
>
> Brendan

There is also a gas mode  http://www.hczim.de/software/gas-mode.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-01-26  3:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-23 10:09 asm mode doesn't recognize gas comments Brendan Miller
2010-01-23 14:15 ` Andreas Politz
2010-01-23 14:18   ` Andreas Politz
2010-01-23 18:22     ` Brendan Miller
     [not found] <mailman.57.1264241362.14305.help-gnu-emacs@gnu.org>
2010-01-26  3:14 ` rustom

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).