You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Jürgen A. Erhard" <ju...@gmx.net> on 2001/05/14 11:18:00 UTC
svn-dev.el and py-indent-offset
Ouch.
I noticed that suddenly out of the blue somebody changed my
py-indent-offset from the default 4 to 2, in *all* Python buffers.
Lots of searching, racking of brain... "Hey, there's a
python-mode-hook!" ("Of course", I thought).
And there's a "svn-python-mode-hook" in there!
And that sets py-indent-offset to 2!
Ouch again... "which is presumably visiting a file in the Subversion
project". Oh sure... desktop.el quite kills that notion.
The best solution, from my POV, would be to just go with Python's std
indent of 4. }:-)
If not that... well, check that the Python source we're about to edit
really is part of Subversion. Simple heuristic, put the whole of
the hook into
(when (string-match "/subversion/" (buffer-file-name))
...
)
(Tested and works)
We could even have the user configure the regexp to match... but since
the default CVS checkout creates a subversion subdir (with two more
levels of subversion subdirs inside ;-) I think this is not really
needed.
Bye, J
--
Jürgen A. Erhard juergen.erhard@gmx.net phone: (GERMANY) 0721 27326
My WebHome: http://members.tripod.com/Juergen_Erhard
Debian GNU/Linux (http://www.debian.org)
If you can't solve a problem with brute force, you're not using enough.