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

[PATCH] lisp coding style in HACKING

From: Oyvind Moll <svn_at_moll.no>
Date: 2004-06-24 11:32:53 CEST

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.

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
Received on Thu Jun 24 11:33:34 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.