Anonymous committed 93d3a6a

Setting module names automatically

Comments (0)

Files changed (3)

 After installing pymacs, add these lines to your ``~/.emacs`` file::
-  (load-library "pymacs")
+  (require 'pymacs)
   (pymacs-load "ropemacs" "rope-")


 Source Repository
-Rope uses Mercurial_ VCS at .
+Ropemacs Mercurial_ repository:
-rope is under the terms of GNU GPL (GNU General Public License).
+Ropemacs is under the terms of GNU GPL (GNU General Public License).
 .. _project download page:
 .. _`rope-dev (at)`:
         return func
+def lispfunction(func):
+    func.lisp = None
+    return func
 class RopeInterface(object):
     def __init__(self):
         self.project = None
         self.old_content = None
-    @interactive()
+    @lispfunction
     def init(self):
         """Initialize rope mode"""
         return ''.join(result)
+    @lispfunction
     def before_save_actions(self):
         if self.project is not None:
             resource = self._get_resource()
                 self.old_content = ''
+    @lispfunction
     def after_save_actions(self):
         if self.project is not None:
             libutils.report_change(self.project, lisp.buffer_file_name(),
             self.old_content = None
+    @lispfunction
     def exiting_actions(self):
         if self.project is not None:
                 lisp.revert_buffer(None, 1)
+def register_functions(interface):
+    for attrname in dir(interface):
+        attr = getattr(interface, attrname)
+        if hasattr(attr, 'interaction') or hasattr(attr, 'lisp'):
+            globals()[attrname] = attr
 interface = RopeInterface()
-init = interface.init
-open_project = interface.open_project
-close_project = interface.close_project
-undo_refactoring = interface.undo_refactoring
-redo_refactoring = interface.redo_refactoring
-rename = interface.rename
-extract_variable = interface.extract_variable
-extract_method = interface.extract_method
-inline = interface.inline
-rename_current_module = interface.rename_current_module
-module_to_package = interface.module_to_package
-move = interface.move
-move_global = interface.move_global
-move_module = interface.move_module
-move_method = interface.move_method
-move_current_module = interface.move_current_module
-organize_imports = interface.organize_imports
-before_save_actions = interface.before_save_actions
-after_save_actions = interface.after_save_actions
-exiting_actions = interface.exiting_actions
-goto_definition = interface.goto_definition
-show_doc = interface.show_doc
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
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.