Build emacs. Multiple columns of comment lines! = 0

Hi, I am working on programming the AT & T architecture for x86 assembly, and I need an emacs editor with build functions. So, I am editing asm-mode to edit the assembly and gas-mode .

I have a question about the functionality of MULTIPLE COMMENTS LINES. When I select a buffer-like area filled with Cx h and auto format with CM \, if the comments of several lines are in column 0, there is no problem, the result will be OK. But if there is a block of several comment lines (# characters) in the column of comment columns, the example column 34

_start: movl (%ebp), eax # comment line 0 # comment line 1 # comment line 2 

The formatting process of the full automation buffer C_M \ places the comment line in the line star in column 0.

What can I do, please, if I want the comment blocks to start with the comment column field? There is some elisp function for beautyfing differentes comment types o differents comments- char character, example example # for the field comment column number and ## for column 0?

Thanks in advance Candido

+4
source share
1 answer

After a few lectures, I have a solution to the comment level problem. There is no user manual about asm programming mode, but reading the emacs manual and some intuition with the esm-mode.el elisp language, I have some conclusions:

  • Use asm mode, not gas mode.
  • Set the asm char character to #.
  • Set the fill prefix with the Cx . command Cx . ( set-fill-prefix ).
  • Use 4 levels of comments:

    # -> end line comment

    ## -> operand column comment

    ### -> begin line comment

    /* */ -> multiple line comments

  • CM area \ re-indenting

  • M-; β†’ a line of repeated indents.
+2
source

All Articles