nxml-mode + tabs
Yesterday Anahide noted that my .pt files contain TABS, oh my.
After careful consideration, yep, i saw that they really
contain tabs. I was confused because i was naive to believe
that '(indent-tabs-mode nil) in my dot emacs will be working
by default with nxml-mode. Explicit is better then implicit,
so i began to explore how to force nxml-mode to use
expliciltly spaces instead of tabs being in nxml mode. Thanks
for Marc-Aurèle, he was kind to make suggestions about my case
and i set hook in .emacs similar to one for xml
(add-hook 'nxml-mode-hook (lambda()
(setq indent-tabs-mode nil)
This works just fine, but note that if you use desktop saving
feature in emacs you need first to delete .emacs.desktop file
otherwise above hook won't work with files that are saved by
desktop, this how it worked for me.
All is left just to run C-x h M-x untabify RET on my *.pt
files to remove tabs.
Well, lesson learned.
(Post originally written by Ruslan Spivak on the old Nuxeo blogs.)
Category: Product & Development