Commits

Anonymous committed 8aad57d

added ropemacs-enable-shortcuts variable

Comments (0)

Files changed (4)

 
   ;; Add this before loading pymacs if you haven't installed rope and ropemacs
   (setq pymacs-load-path '("/home/ali/projects/rope"
-			   "/home/ali/projects/ropemacs"))
+                           "/home/ali/projects/ropemacs"))
 
 .. _`rpymacs snapshot`: http://rope.sf.net/hg/rpymacs/tip.tar.gz
 
 C-c r o           rope-organize-imports
 C-c r n [vfcmp]   rope-generate-(variable|function|class|module|package)
 
+C-c r /           rope-code-assist
+C-c r g           rope-goto-definition
+C-c r d           rope-show-doc
+C-c r f           rope-find-occurrences
+C-c r ?           rope-lucky-assist
+===============   ============================
+
+These shortcut keys are enabled only when
+``ropemacs-enable-shortcuts`` variable is non-nil:
+
+================  ============================
+Key               Command
+================  ============================
 M-/               rope-code-assist
 C-c g             rope-goto-definition
-C-c C-d           rope-show-doc
-C-c f         	  rope-find-occurrences
-M-?           	  rope-lucky-assist
-===============   ============================
+C-c d             rope-show-doc
+C-c f             rope-find-occurrences
+M-?               rope-lucky-assist
+================  ============================
 
 
 Variables
   Defaults to ``C-c r``.
 * ``ropemacs-global-prefix``: The prefix for ropemacs project commands
   Defaults to ``C-x p``.
+* ``ropemacs-enable-shortcuts``: Shows whether to bind ropemacs
+  shortcuts keys.  Defaults to ``t``.
 
 
 Contributing
  Done
 ======
 
+- added ropemacs-enable-shortcuts : January 3, 2008
+
 > Public Release 0.5c1 : January 3, 2008
 
 - deprecated rope-code-assist-max-fixes : December 28, 2007

ropemacs/__init__.py

     ropemacs.lisputils.lisp.warn(
         'Calling (rope-init) is no longer needed.')
 
-interface = ropemacs.interface.Ropemacs()
-_register_functions(interface)
-interface.init()
+_interface = ropemacs.interface.Ropemacs()
+_register_functions(_interface)
+_interface.init()

ropemacs/interface.py

                 key = prefix + ' ' + key
                 lisp.local_set_key(self._key_sequence(key), callback)
         for key, callback in self.shortcuts:
-            lisp.local_set_key(self._key_sequence(key), callback)
+            if lisp['ropemacs-enable-shortcuts'].value():
+                lisp.local_set_key(self._key_sequence(key), callback)
 
     @lisphook
     def exiting_actions(self):
 
 Use nil to prevent binding keys.")
 
+(defcustom ropemacs-enable-shortcuts 't
+  "Shows whether to bind ropemacs shortcuts keys.
+
+If non-nil it binds:
+
+========================  =========
+command                   shortcut
+========================  =========
+rope-code-assist          M-/
+rope-goto-definition      C-c g
+rope-show-doc             C-c d
+rope-find-occurrences     C-c f
+rope-lucky-assist         M-?
+========================  =========
+")
+
 (provide 'ropemacs)
 """
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.