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()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.