help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wrapping code in a try/except


From: Andrea Crotti
Subject: Wrapping code in a try/except
Date: Wed, 03 Nov 2010 11:13:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin)

It would be nice sometimes to be able to wrap multiple lines

istruction1();
istruction2();

in something like

try {
    istruction1();
    istruction2();
} except ...

I can use for example
(kill-region (point) (mark))

then insert what the construct and yank what I killed, but I would
rather use a yasnippet snippet for it, but I can't use a snippet since
while I'm writing I don't have a region selected...

Should I create a command instead? Or is there something for these kind
of things?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]