Commits

Anonymous committed e09df1e

Added rope-code-assist-max-fixes variable

Comments (0)

Files changed (3)

 * ``rope-confirm-saving``: If non-nil, you have to confirm saving all
   modified python files before refactorings; otherwise they are saved
   automatically. Defaults to ``t``.
+* ``rope-code-assist-max-fixes``: The maximum number of syntax errors
+  to fix for code assists.  The default value is ``1``.
 
 
 Contributing
  Done
 ======
 
+- added ``rope-code-assist-max-fixes`` config : December 17, 2007
 - not raising exceptions in hooks : December 5, 2007
 
 > Public Release 0.3 : December 5, 2007

ropemacs/__init__.py

         self._check_project()
         resource, offset = self._get_location()
         source = lisp.buffer_string()
-        proposals = codeassist.code_assist(self.project, source,
-                                           offset, resource)
+        maxfixes = lisp['rope-code-assist-max-fixes'].value()
+        proposals = codeassist.code_assist(self.project, source, offset,
+                                           resource, maxfixes=maxfixes)
         proposals = codeassist.sorted_proposals(proposals)
         starting_offset = codeassist.starting_offset(source, offset)
         names = [proposal.name for proposal in proposals]
   "If non-nil, you have to confirm saving all modified
 python files before refactorings; otherwise they are
 saved automatically.")
+(defvar rope-code-assist-max-fixes 1
+  "How many errors to fix, at most, when proposing code
+completions.")
 """
 
 interface = RopeInterface()