Florent Rougon <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (Jérôme Marant) wrote: > >> Hi, > > Hi, > >> I'm sorry, this may be a bit off topic but I don't really know >> where I can post this question. > > fr.comp.applications.emacs would be quite OK. ;-)
Sorry, I'm not using Usenet at all. > >> I'm a bit annoyed with Emacs when editing Python programs because >> Emacs always replaces TABs with spaces ; this wouldn't bother me if >> Emacs was the only editor in the world. But when you share programs >> with others, it is better to have real TABs instead of spaces. >> I know about the "C-q TAB" but I don't want to use it every time >> I want automatic indentation. >> >> Does anyone know how to achieve this? > > I *hate* tabs in files, but here it goes... I don't really care as long as Emacs can handle it transparently. > (add-hook 'python-mode-hook #'(lambda () > (local-set-key "\t" > #'(lambda () > (interactive) > (insert "\t"))))) > > Please, don't spread this two much... nice Python code with ugly tabs > makes me depressed. :) This solution looks nice too compared to what was proposed here previously. Thanks. Cheers, -- Jérôme Marant http://marant.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]