Pada Senin, 16 Februari 2009 23.03.24 UTC+7, Peter Breitfeld menulis:
Christoph Martel wrote:
One of the charming features of Emacs is hitting Shift-Meta-( and
inserting a closed pair of parentheses (). However, Emacs inserts a
space before the opening ( and after the closing ). Can I somehow tell Emacs at least not to do the opening space, so I could type "testShift-Meta-(" and get "test()"? It would be even more helpful, if
the cursor could be placed between ( and ).
I'd appreciate every hint,
Chris
In my .emacs I have
(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)
Then it' enough to enter a "(" only and to get automically the pair of parentheses with the cursor placed between.
--
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)