[XviD-devel] [BUG]Tab
Ivan Kalvachev
ivan at cacad.com
Mon Oct 27 22:40:44 CET 2003
Edouard Gomez said:
> skal (skal at planet-d.net) wrote:
>> (btw: please, very please, don't replace spaces by tabs. This is a
>> very Bad Habit).
>
> Arf grrmmpf, a bit late, I spent all my afternoon to indent all the asm
> code the same way... I'll do a pass of M-x untabify all over the buffers.
>
> Btw using tabs is not a bad habit, it's just a troll topic for insane
> people using spaces ;-)
>
> Anyway, the bitch work i've done today was to be done, because there
> were very ugly, unreadable files (in particular the optimized 3dne). And
> tabs (one or two depending on the file) seemed to be the more used way
> of indenting code.
>
> Style i used this afternoon is:
> BITS 32
> SECTION .rodata ; as we do thread safe code, no other type of .data
> ; section should be used
> label:
> tab db 1,2,3,4
> or (if this looks better)
> label: space db space data
>
> SECTION .text
>
> cglobal func1
> cglobal func2
> cglobal func3
>
> ALIGN 16
> func1:
> tab opcode (tab)+ operand[, operand]*
> ^
> depending on the larger opcode of the code unit
>
> tabs are width==4 as all the rest of XviD sources.
>
> And for people using emacs:
>
> (defun xvid-asm-mode ()
> "ASM mode for XviD"
> (interactive)
> (asm-mode)
> (message "Loading xvid-asm-mode")
> (setq mode-name "XviD ASM")
> (setq tab-width 4)
> (setq tab-stop-list (loop for i from 4 to 120 by 4 collect i))
> )
> (setq auto-mode-alist
> (cons '("/.*/xvidcore.*/.*\\.asm$" . xvid-asm-mode)
> auto-mode-alist))
>
> I'll probably have to add:
> (setq indent-tabs-mode nil) to use spaces *sic* *cough*
>
> Are you really sure you want spaces ?
>
Resently i had to took a look of the xvid source code, and i found it very
ugly! Why? becouse under unix tabs are by default 8 spaces.
You just cannot imagine how many programs i should reconfigure ;) Not to
mension how many texts will look strange after that.
There are and other issues with tabs (e.g. tab is not always 8 spaces, it
just alignes the text to the position)
Anyway i think that "indent --no-tabs" may help you;)
Not using tabs is GOOD thing.
Best Regards
Ivan Kalvachev
iive
p.s. sorry for the useless post.
More information about the XviD-devel
mailing list