Here is the function spec: (defun jump-to-matched (open-char closed-char) )
say the content of current buffer is "a([b]c()d)".
If I move the cursor over the first "(" and run (jump-to-matched "(" ")")
, I expect the function return 9 which is the position of ")" at the end of the buffer.
If I move the cursor over the "[" at the position 2 and run (jump-to-matched "[" "]")
, I expect the function return 4 which is the position of "]".
My question is how to implement such function?