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

Re: [PATCH] lisp coding style in HACKING

From: <kfogel_at_collab.net>
Date: 2004-06-25 15:39:06 CEST

Oyvind Moll <svn@moll.no> writes:
> Coding style fix for emacs-lisp snippet.
>
> * HACKING: Use let instead of setq in the hook function to avoid the
> side effect of changing svntree-path globally.

Thank -- I committed something based on this, in r10075.

-Karl

> Index: HACKING
> ===================================================================
> --- HACKING (revision 10066)
> +++ HACKING (working copy)
> @@ -463,11 +463,11 @@
> (setq svntree-path "~/projects/subversion/")
>
> (defun my-find-file-hook ()
> - (setq svntree-path (expand-file-name svntree-path))
> - (if (string-match (concat svntree-path "doc/book") buffer-file-name)
> - (load (concat svntree-path "doc/book/tools/svnbook"))
> - (if (string-match svntree-path buffer-file-name)
> - (load (concat svntree-path "tools/dev/svn-dev")))))
> + (let ((svntree-path (expand-file-name svntree-path)))
> + (if (string-match (concat svntree-path "doc/book") buffer-file-name)
> + (load (concat svntree-path "doc/book/tools/svnbook"))
> + (if (string-match svntree-path buffer-file-name)
> + (load (concat svntree-path "tools/dev/svn-dev"))))))
>
> (add-hook 'find-file-hooks 'my-find-file-hook)
> ;;; End Subversion development section
>
>
> --
> Øyvind Møll
> oyvind@moll.no
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 25 17:04:43 2004

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.