emacs-devel
[Top][All Lists]
Advanced

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

Re: paren-close-dwim: elisp function of a newbie; feedback welcome


From: Florian
Subject: Re: paren-close-dwim: elisp function of a newbie; feedback welcome
Date: Thu, 26 Sep 2013 22:44:16 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

> I'm not sure what you mean about "repairing ... code".  This command
> simply inserts ')', ']', or '}' (and perhaps '>' or so) to match the
> most recent unclosed ([{<.
> 
> (If it is "really useful", know that it's not my idea; you just quoted
> my reimplementation of Florian's code.)

But yours is much cleaner, I like it. Thanks for that.

Here is a small example to illustrate what it does:

If you are writing a nested expression, like the following, and '_' is
your cursor,

{ (a * [(b) - (c) _

and you have bound ')' to paren-close-dwim (dwim = do what I mean),
three succeeding presses of ')' will produce the sequence: ])}. Or in
other words: ')' will produce the correct next matching closing
bracket regarding the position of your cursor.

Florian




reply via email to

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