4

I am using paredit. It terminates ( and [ and " fine, but does not close the { in any modes. How can i configure it to do this too? I have emacs24.

7

The commands are defined, but not bound to a key by default. You can add them to the paredit map with this:

(eval-after-load 'paredit
  '(progn
     (define-key paredit-mode-map (kbd "{")
       'paredit-open-curly)
     (define-key paredit-mode-map (kbd "}")
       'paredit-close-curly)))

You may prefer to add them to particular programming mode keymaps, rather than the paredit-mode-map; just modify accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy