Anonymous committed 682f1cc

ropemode: not using emacs style variable names

Comments (0)

Files changed (2)


         return lisp.y_or_n_p(prompt)
     def get(self, name):
-        return lisp[name].value()
+        return lisp['ropemacs-' + name.replace('_', '-')].value()
     def get_offset(self):
         return lisp.point() - 1
         lisp.local_set_key('q', lisp.delete_window)
     def show_doc(self, docs):
-        fit_lines = self.get('ropemacs-max-doc-buffer-height')
+        fit_lines = self.get('max_doc_buffer_height')
         buffer = self._make_buffer('*rope-pydoc*', docs,
                                    empty_goto=False, fit_lines=fit_lines)
         lisp.local_set_key('q', lisp.bury_buffer)
     def global_prefix(self):
-        return self.get('ropemacs-global-prefix')
+        return self.get('global_prefix')
     def local_prefix(self):
-        return self.get('ropemacs-local-prefix')
+        return self.get('local_prefix')
 def _lisp_name(name):


         self.autoimport = None
-        self._init_ropemacs()
+        self._init_mode()
     def init(self):
         """Initialize rope mode"""
-    def _init_ropemacs(self):
+    def _init_mode(self):
         for attrname in dir(self):
             attr = getattr(self, attrname)
             if not callable(attr):
         progress = self.env.create_progress('Opening [%s] project' % root)
         self.project = rope.base.project.Project(root)
-        if self.env.get('ropemacs-enable-autoimport'):
-            underlined = self.env.get('ropemacs-autoimport-underlineds')
+        if self.env.get('enable_autoimport'):
+            underlined = self.env.get('autoimport_underlineds')
             self.autoimport = autoimport.AutoImport(self.project,
     def goto_definition(self):
         resource, offset = self._get_location()
-        maxfixes = self.env.get('ropemacs-codeassist-maxfixes')
+        maxfixes = self.env.get('codeassist_maxfixes')
         definition = codeassist.get_definition_location(
             self.project, self._get_text(), offset, resource, maxfixes)
         if tuple(definition) != (None, None):
     def show_call_doc(self, prefix):
-        self.env.message('ropemacs: use `rope-show-calltip\' instead!')
+        self.env.message('ropemode: use `show_calltip\' instead!')
     def _base_show_doc(self, prefix, get_doc):
-        maxfixes = self.env.get('ropemacs-codeassist-maxfixes')
+        maxfixes = self.env.get('codeassist_maxfixes')
         text = self._get_text()
         offset = self.env.get_offset()
         docs = get_doc(self.project, text, offset,
                        self._get_resource(), maxfixes)
         use_minibuffer = not prefix
-        if self.env.get('ropemacs-separate-doc-buffer'):
+        if self.env.get('separate_doc_buffer'):
             use_minibuffer = not use_minibuffer
         if use_minibuffer and docs:
             docs = '\n'.join(docs.split('\n')[:7])
         if self.autoimport is None:
             self.env.message('autoimport is disabled; '
-                             'see `ropemacs-enable-autoimport\' variable')
+                             'see `enable_autoimport\' variable')
             return False
         return True
     def generate_autoimport_cache(self):
         if not self._check_autoimport():
-        modules = self.env.get('ropemacs-autoimport-modules')
+        modules = self.env.get('autoimport_modules')
         modnames = []
         if modules:
             for i in range(len(modules)):
         return result
     def _save_buffers(self, only_current=False):
-        ask = self.env.get('ropemacs-confirm-saving')
+        ask = self.env.get('confirm_saving')
         if only_current:
             filenames = self.env.filename()
     def _calculate_proposals(self):
         resource = self.interface._get_resource()
-        maxfixes = self.env.get('ropemacs-codeassist-maxfixes')
+        maxfixes = self.env.get('codeassist_maxfixes')
         proposals = codeassist.code_assist(
             self.interface.project, self.source, self.offset,
             resource, maxfixes=maxfixes)
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.