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

Getting rid of the Emacs cruft

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-11-11 22:13:31 CET

Karl Fogel wrote:
> Greg Stein wrote:
> > Karl: is there a "visit file" hook of some kind? Can we use that
> > to set the modes, rather than the auto loading stuff?
>
> Sure. I'll write something up tomorrow and post it here.
>
> (I'd like to get that cruft out of the source files too.)

Sorry, I forgot about this for a while.

The solution is very simple. Emacs users just need to put this in
their .emacs, of course customized in the obvious ways:

   (defun svn-find-file-hook ()
     (if (string-match "subversion/" buffer-file-name)
         (load "~/src/subversion/tools/dev/svn-dev")))

   (add-hook 'find-file-hooks 'svn-find-file-hook)

Note that the lack of ".el" is on purpose; see the doc string for
`load' for how that works.

If there are no objections, I'll remove all the explicit load lines
from our C files.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 11 22:47:16 2002

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.