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

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

Re: Crazy idea for M-(: surround region


From: Olivier Aumage
Subject: Re: Crazy idea for M-(: surround region
Date: Sun, 13 Jul 2003 09:36:58 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

kai.grossjohann@gmx.net (Kai Großjohann) writes:

> If transient-mark-mode is active, M-( should surround the region with
> parens, ie do like C-w M-( C-y.

I just wanted to mention that a similar behaviour can already be
obtained with the 'skeleton-pair' feature. If the transient-mark-mode
is active, typing a 'skeleton-pair' key surrounds the region with the
corresponding pair. So, it is indeed a good idea to provide a similar
behaviour for 'insert-parentheses'.

%---[ .emacs ]----------------------------------
(setq skeleton-pair t)
(global-set-key "(" 'skeleton-pair-insert-maybe)
(global-set-key "[" 'skeleton-pair-insert-maybe)
(global-set-key "{" 'skeleton-pair-insert-maybe)
(global-set-key "<" 'skeleton-pair-insert-maybe)
(global-set-key "`" 'skeleton-pair-insert-maybe)
...
%-----------------------------------------------

-- 
Olivier


reply via email to

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