From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: whitespace issues
Date: Wed, 01 Jul 2015 19:14:52 +0200 [thread overview]
Message-ID: <87wpyjhkab.fsf@nl106-137-147.student.uu.se> (raw)
In-Reply-To: 1a3dafd0-7772-43a2-a6cc-d83634003eb6@googlegroups.com
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
prev parent reply other threads:[~2015-07-01 17:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 14:17 whitespace issues Rusi
2015-06-30 14:54 ` tomas
[not found] ` <mailman.6025.1435676084.904.help-gnu-emacs@gnu.org>
2015-06-30 14:57 ` Rusi
2015-06-30 15:03 ` Jorge A. Alfaro-Murillo
2015-06-30 15:06 ` Óscar Fuentes
2015-06-30 15:24 ` Ian Zimmerman
[not found] ` <mailman.6026.1435676539.904.help-gnu-emacs@gnu.org>
2015-06-30 16:21 ` Rusi
2015-06-30 16:35 ` Rasmus
2015-06-30 16:27 ` Dan Espen
2015-06-30 23:25 ` Emanuel Berg
[not found] ` <mailman.6027.1435676795.904.help-gnu-emacs@gnu.org>
2015-07-01 2:37 ` Rusi
2015-07-01 8:06 ` tomas
[not found] ` <mailman.6071.1435706838.904.help-gnu-emacs@gnu.org>
2015-07-01 2:50 ` Rusi
2015-07-01 14:33 ` Jorge A. Alfaro-Murillo
2015-07-01 17:14 ` Emanuel Berg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wpyjhkab.fsf@nl106-137-147.student.uu.se \
--to=embe8573@student.uu.se \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.