I have an existing command (increment-numbers-in-region
) which is declared using interactive "r"
to get region start and end points as arguments. I would now like to extend this command to take a prefix argument as well. Is there a way to combine interactive "r"
with interactive "p"
or should I go about it in some other way?
I guess I could write a command which uses interactive "p"
only, and then read point and mark from the command body, but it feels like that might not be the most idiomatic way.
Any ideas?
C-hf interactive
RET
"To get several arguments, concatenate the individual strings, separating them by newline characters."
(defun increment-numbers-in-region (start end arg)
(interactive "r\np")
...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With