Commits

Ali Gholami Rudi  committed 13ea168

ropemacs: added LispUtils.prefix_value()

  • Participants
  • Parent commits 66adb73

Comments (0)

Files changed (2)

File ropecommon/interface.py

     def code_assist(self, prefix):
         names = self._calculate_proposals()
         if prefix is not None:
-            arg = lisp.prefix_numeric_value(prefix)
+            arg = self.env.prefix_value(prefix)
             if arg == 0:
                 arg = len(names)
             common_start = self._calculate_prefix(names[:arg])
         names = self._calculate_proposals()
         selected = 0
         if prefix is not None:
-            selected = lisp.prefix_numeric_value(prefix)
+            selected = self.env.prefix_value(prefix)
         if 0 <= selected < len(names):
             result = names[selected]
         else:
     def push_mark(self):
         lisp.push_mark()
 
+    def prefix_value(self, prefix):
+        return lisp.prefix_numeric_value(prefix)
+
 
 class _LispProgress(object):