Commits

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-")
   (rope-init)
 

docs/ropemacs.txt

 Source Repository
 =================
 
-Rope uses Mercurial_ VCS at http://rope.sourceforge.net/hg/ropemacs .
+Ropemacs Mercurial_ repository:
+  http://rope.sourceforge.net/hg/ropemacs
 
 
 Feedback
 License
 =======
 
-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: http://sf.net/projects/rope/files
 .. _`rope-dev (at) googlegroups.com`: http://groups.google.com/group/rope-dev
         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"""
         lisp.add_hook(lisp.before_save_hook,
                 result.append(key)
         return ''.join(result)
 
+    @lispfunction
     def before_save_actions(self):
         if self.project is not None:
             resource = self._get_resource()
             else:
                 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)
             self.old_content = None
 
+    @lispfunction
     def exiting_actions(self):
         if self.project is not None:
             self.close_project()
                 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
+register_functions(interface)
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.