1. offbyone
  2. ropemacs


Ali Gholami Rudi  committed 4d5e135

removed rope-complete-and-import command

  • Participants
  • Parent commits 9a04203
  • Branches trunk

Comments (0)

Files changed (2)

File README.txt

View file
  • Ignore whitespace
 C-c r ?           rope-lucky-assist
-                  rope-complete-and-import
 ===============   ============================
 Enabling Autoimport
-Ropemacs provides two commands called ``rope-auto-import`` and
-``rope-complete-and-import`` that can be used to find the module a
-name is defined in and add an import for that name.  But they are
-disabled by default.  Before using them you should add::
+Rope can propose and automatically import global names in other
+modules.  But this feature disabled by default.  Before using them you
+should add::
   (setq ropemacs-enable-autoimport 't)
   from shutil import rmtree
-``ropemacs-complete-and-import`` proposes names starting with the
-given word, too.  Note that these commands are not bound to a key by
-default.  You can do that yourself if you use them a lot.
+Also ``rope-code-assist`` and ``rope-lucky-assist`` propose
+auto-imported names by using ``name : module`` style.  Selecting them
+will import the module automatically.

File ropemacs/interface.py

View file
  • Ignore whitespace
             lisputils.message('Global name %s not found!' % name)
-    def complete_and_import(self):
-        if not self._check_autoimport():
-            return
-        starting = lisp.current_word()
-        proposals = [x[0] + ' : ' + x[1]
-                     for x in self.autoimport.import_assist(starting)]
-        if proposals:
-            if len(proposals) == 1:
-                proposal = proposals[0]
-            else:
-                proposal = lisputils.ask_values('Which to import: ',
-                                                proposals)
-            name, module = proposal.rsplit(' : ', 1)
-            lisp.insert(name[len(starting):])
-            self._insert_import(name, module)
-        else:
-            lisputils.message(
-                'No global name starting with %s found!' % starting)
-    @interactive
     def generate_autoimport_cache(self):
         if not self._check_autoimport():