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

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

Re: Skeleton pair only working partialy in C++


From: David Hansen
Subject: Re: Skeleton pair only working partialy in C++
Date: Fri, 02 May 2008 22:10:45 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux)

On Fri, 2 May 2008 09:33:11 -0700 (PDT) TheLonelyStar wrote:

> I have enabled skeleton-pair funcionality with what I have found in here:
> http://littlechina.org/~cmarcelo/paren-experiment.el
> It works in most modes, but in C++ mode it only works for [ and not for (,{
> or ".

Try:

(define-key c-mode-base-map (kbd "(") #'skeleton-pair-insert-maybe)
;; same for the other keys here...

or

(add-hook 'c-mode-common-hook
          #'(lambda ()
              (local-set-key (kbd "(") #'skeleton-pair-insert-maybe)
              ;; same for the other keys here...
              ))

If you don't like the way skeleton decides whether to insert a pair or
not but to insert a pair always use `insert-pair' instead of
`skeleton-pair-insert-maybe'.

David





reply via email to

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