Anonymous avatar Anonymous committed 0657aae Draft

ropemacs: added LispUtils.y_or_n()

Comments (0)

Files changed (2)

ropecommon/interface.py

         if change is None:
             self.env.message('Nothing to undo!')
             return
-        if lisp.y_or_n_p('Undo <%s>? ' % str(change)):
+        if self.env.y_or_n('Undo <%s>? ' % str(change)):
             def undo(handle):
                 for changes in self.project.history.undo(task_handle=handle):
                     self._reload_buffers(changes, undo=True)
         if change is None:
             self.env.message('Nothing to redo!')
             return
-        if lisp.y_or_n_p('Redo <%s>? ' % str(change)):
+        if self.env.y_or_n('Redo <%s>? ' % str(change)):
             def redo(handle):
                 for changes in self.project.history.redo(task_handle=handle):
                     self._reload_buffers(changes)
     def yes_or_no(self, prompt):
         return lisp.yes_or_no_p(prompt)
 
+    def y_or_n(self, prompt):
+        return lisp.y_or_n_p(prompt)
+
     def get_region(self):
         offset1 = self.get_offset()
         lisp.exchange_point_and_mark()
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.