[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn-dev.el and py-indent-offset

From: Jürgen A. Erhard <juergen.erhard_at_gmx.net>
Date: 2001-05-14 13:18:00 CEST

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.

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:30 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.