5

I'm performing a large python refactor, and one component of that is renaming many variables from camelCase to snake_case. I'd like to hook a camel-to-snake conversion function (which I already have) into the default values of rope-refactor.

When I inspect rope-refactor, I get the following information.

rope-rename is an interactive Lisp function.

(rope-rename &rest ARGUMENTS)

It interfaces to a Python function.

Rope interfaces with Emacs through Pymacs. What would be the recommended way of achieving these defaults? Should I make the change in Rope's python modules, or is there an elegant way of setting the default arguments on the elisp side? I'd prefer the latter.

1
  • First, you need to determine what arguments rope-rename requires. (Can you view it's definition? We should be able to tell from the (interactive) spec). After that, making some arguments default is child's play.
    – PythonNut
    Commented Apr 13, 2015 at 20:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.