I'm not too familiar with elisp, and am trying to learn. In emacs, I'd like to be able to do the following:
- Mark via C-space
- Go to where I want the the marking to end, so I have a region that is highlighted, suppose it is "highlighted text"
- Hit a key-sequence
- Have emacs ask me to input some text, say "plot", and
Have that highlighted text change to be "plot(highlighted text)". That is, I'd like to wrap the highlited text with parentheses and precede it with the text I input.
(defun wrap-text () )
I suppose the input of the function would be the highlighted text, but I don't know where to start looking. The other hard part would be the input text part. Could someone guide me? Thanks.