[OS X Emacs] delete parantheses pair

David Rogoff cs80 at therogoffs.com
Wed Feb 9 00:40:26 EST 2011


>
> I want to code a function or a macro that would delete a pair of
> delimiters (but not what is inside) and optionally the adjoined word
>
> so this
>
> { abcdefgh }.sth
>
> would become
>
> abcdefgh
>
> but as soon as I delete one of the delimiters I cannot move to the other
> as it is no longer balanced.. how can I do this ?
>
> maybe there is already sth similar implemented ??
>
Really crude solution from a semi-elisp-literate user:
1) search for the opening delimiter
2) insert some unique character string there (e.g. ZYZYZY)
3) go to the closing delimiter and delete it
4) back search for the ZYZYZY string and delete it and the following 
character, which should be the opening delimiter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20110208/a4a402f5/attachment.html>


More information about the MacOSX-Emacs mailing list