all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Hansen <david.hansen@gmx.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Skeleton pair only working partialy in C++
Date: Fri, 02 May 2008 22:10:45 +0200	[thread overview]
Message-ID: <87myn8o4ai.fsf@localhorst.mine.nu> (raw)
In-Reply-To: 17023138.post@talk.nabble.com

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	other threads:[~2008-05-02 20:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-02 16:33 Skeleton pair only working partialy in C++ TheLonelyStar
2008-05-02 20:10 ` David Hansen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87myn8o4ai.fsf@localhorst.mine.nu \
    --to=david.hansen@gmx.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.