[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: whitespace issues
From: |
Emanuel Berg |
Subject: |
Re: whitespace issues |
Date: |
Wed, 01 Jul 2015 19:14:52 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Rusi <rustompmody@gmail.com> writes:
> (add-hook 'before-save-hook
> 'untab-python
> )
>
> (defun untab-python ()
> (when (member major-mode '(python-mode))
> (untabify (point-min) (point-max)))
> nil)
>
> 1. dunno about the save-excursion
You don't need it. Examine `untabify' as that is the
only thing that could possible be the reason to use
it. It isn't, but when in doubt, isolate what is
doubted and test it.
> 2. member rather than equal/eq so that other modes
> can be added as desired
Indeed, however then should it still be named
"untab-python"? Unless there are several Python modes,
which OTOH wouldn't surprise me considering how much
extracurriculuous activity that comes with...
--
underground experts united
http://user.it.uu.se/~embe8573