Commits

Ali Gholami Rudi  committed 65a58b5

added ropemacs-enable-autoimport variable

  • Participants
  • Parent commits 1e28967

Comments (0)

Files changed (2)

   Defaults to ``C-x p``.
 * ``ropemacs-enable-shortcuts``: Shows whether to bind ropemacs
   shortcuts keys.  Defaults to ``t``.
+* ``ropemacs-enable-autoimport``: Shows whether to enable autoimport.
 
 
 Contributing

File ropemacs/interface.py

             self.close_project()
         progress = lisputils.create_progress('Opening "%s" project' % root)
         self.project = rope.base.project.Project(root)
-        self.autoimport = autoimport.AutoImport(self.project)
+        if lisp['ropemacs-enable-autoimport'].value():
+            self.autoimport = autoimport.AutoImport(self.project)
         progress.done()
 
     @interactive
     @rawprefixed
     def auto_import(self, prefix):
         self._check_project()
+        if self.autoimport is None:
+            return
         name = lisp.current_word()
         modules = self.autoimport.get_modules(name)
         if modules:
 
 How many errors to fix, at most, when proposing code completions.")
 
+(defcustom ropemacs-enable-autoimport 'nil
+  "Specifies whether autoimport should be enabled.")
+
 (make-obsolete-variable
   'rope-confirm-saving 'ropemacs-confirm-saving)
 (make-obsolete-variable