<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -33,7 +33,7 @@
 ;; * Follow the installation instructions
 ;; * Open a python file (ensure the Pysmell appears in the modeline)
 ;; * Run M-x pysmell-make-tags in some directory containing the directory tree containing the current file.
-;; * Press M-/ to complete a symbols using pysmell
+;; * Press M-/ to complete a symbol using pysmell
 
 ;;; Documentation:
 ;; PySmell will try to intelligently complete symbol in Python
@@ -63,34 +63,26 @@
 
 ; Integration of pysmell with autocompletion
 
-
 (require 'pymacs)
 (require 'hippie-exp)
 (require 'cl)
 
-
-(pymacs-terminate-services)
-
 (defvar pysmell-matcher &quot;case-sensitive&quot; &quot;Type of matching to perform&quot;)
 
 (pymacs-load &quot;pysmell.emacshelper&quot; &quot;pysmell-&quot;)
 (setq pysmell-make-tags-process (list &quot;pysmell&quot;))
 
-(defun pysmell-all-completions ()
-    (setq completions (pysmell-get-completions 
-		       (buffer-file-name)
-		       (buffer-string)
-		       (line-number-at-pos)
-		       (current-column)
-		       pysmell-matcher))
-    (lambda () (pop completions)))
 
+(defun pysmell-get-all-completions ()
+  &quot;Get all the completions for the symbol under the point.&quot;
+  (pysmell-get-completions 
+   (buffer-file-name)
+   (buffer-string)
+   (line-number-at-pos)
+   (current-column)
+   pysmell-matcher))
 
-(defun pysmell-first-completion ()
-  (interactive)
-  (insert (funcall (pysmell-all-completions))))
 
-  
 (defun pysmell-make-tags (directory)
   &quot;Makes tags in the current tree&quot;
   (interactive &quot;D&quot;)
@@ -104,15 +96,13 @@
   (switch-to-buffer-other-window &quot;*make-pysmell-tags*&quot;)))
 
 
-(setq pymsell-completion-iterator nil)
-
-
+(setq pysmell-completions nil)
 (defun try-pysmell-complete (old)
   &quot;Cycle through pysmell completions for the text behind the point&quot;
   (interactive &quot;P&quot;)
   (let (sub)
     (if (not old)
-	(setq pysmell-completion-iterator (pysmell-all-completions)))
+	(setq pysmell-completions (pysmell-get-all-completions)))
     (if (null old)
 	(let ((region (pysmell-find-subst-region)))
 	      (if region
@@ -122,8 +112,7 @@
 		 (progn
 		   (insert &quot; &quot;)
 		   (point)))))))
-
-    (if (setq sub (funcall pysmell-completion-iterator))
+    (if (setq sub (pop pysmell-completions))
 	(he-substitute-string sub)
       (he-reset-string))
     (not (null sub)))
@@ -140,7 +129,6 @@
 		  (progn (insert &quot; &quot;) (point))))
       (list beg end))))
 
-
 (define-minor-mode pysmell-mode
   &quot;Toggle PySmell mode.
 With no argument, this command toggles the mode.
@@ -158,11 +146,7 @@ static analysis.&quot;
  ;; The minor mode bindings.
  `((,(kbd &quot;M-/&quot;) . pysmell-complete))
  :group 'pysmell)
-
-
-
-
 (provide 'pysmell)
 
-;;; ends here
+;;; pysmell.el ends here
      </diff>
      <filename>pysmell.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>13d8f2963d97141557fe66d11343575a7fa6644c</id>
    </parent>
  </parents>
  <author>
    <name>Tom Wright</name>
    <email>tat.wright@tat.wright.name</email>
  </author>
  <url>http://github.com/orestis/pysmell/commit/dc43aba0e9ef924d7d49e2d2c356c34198f2a0d2</url>
  <id>dc43aba0e9ef924d7d49e2d2c356c34198f2a0d2</id>
  <committed-date>2008-10-31T16:52:27-07:00</committed-date>
  <authored-date>2008-10-31T15:54:38-07:00</authored-date>
  <message>* Minor cleaning of pysmell.el

By Tom</message>
  <tree>d7cf93ab790fbbb5c01d7619ae0435600c15f8b9</tree>
  <committer>
    <name>Tom Wright</name>
    <email>moment@moment.(none)</email>
  </committer>
</commit>
