I'm developing a text annotation system in emacs, where the format of the annotation is something like this. If this is the text:
Lorem ipsem por favor
I need to annotate it like this:
{latin}Lorem imsem{/latin} {spanish}por favor{/spanish}
So what I want to do is select a region and then run a function or a macro that will prompt for the tag name, and insert the curly braces, the closing / and the tag name into the buffer at the start and end of the region.
This is probably pretty straightforward, but I've always found emacs lisp to be rather confusing to get started with, because I don't use it very often at all.