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

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

Re: Automatic matching parenthesis


From: address@hidden
Subject: Re: Automatic matching parenthesis
Date: Mon, 16 Mar 2009 04:02:57 -0700 (PDT)
User-agent: G2/1.0

On 16 Mrz., 11:24, Andy Stewart <lazycat.mana...@gmail.com> wrote:
> "christopher.morris...@googlemail.com"
>
> <christopher.morris...@googlemail.com> writes:
> > Hi,
>
> > added these lines to my .emacs-file, so that parenthesis are
> > automatically matched:
> > (setq skeleton-pair t)
> > (global-set-key (kbd "(") 'skeleton-pair-insert-maybe)
> > (global-set-key (kbd "{") 'skeleton-pair-insert-maybe)
>
> > But it does not work in cc-mode. Any idea?
>
> Why not use paredit.el?
> Athttp://www.emacswiki.org/emacs/ParEdit
>
> It can complete your parenthesis, it won't complete paranthesis when you
> type in comment.
>
> I think paredit.el is very nice for parenthesis completion.
>
> Regards,
>
>   -- Andy

Thanks alot. But I cant figure out, how to enable paredit alway in c-
mode. I tried:
(add-hook c-mode-hook (lambda () (paredit-mode +1))). I get an error
message starting up emacs. Any idea?

Regards,

Chris


reply via email to

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