I have a Macbooc Pro with Sweden keyboard so had a little different
issues here - by default not possible to type characters {[]} on
Carbon Emacs.
I solved it by adding the following to my .emacs file:

;; paredit-mode
(add-to-list 'load-path (expand-file-name "~/.emacs.d/paredit"))

(autoload 'paredit-mode "paredit"
  "Minor mode for pseudo-structurally editing Lisp code."
  t)
(autoload 'enable-paredit-mode "paredit")
(add-hook 'clojure-mode-hook    'enable-paredit-mode)
(add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode)

(when (eq system-type 'darwin)
  (eval-after-load "paredit"
    '(progn
       (define-key paredit-mode-map (kbd "M-7")
         'paredit-open-curly)
       (define-key paredit-mode-map (kbd "M-8")
         'paredit-open-square)
       (define-key paredit-mode-map (kbd "M-9")
         'paredit-close-square)
       (define-key paredit-mode-map (kbd "M-0")
         'paredit-close-curly))))

Maybe the following snippet solves your issue:

(global-set-key (kbd "M-3") (lambda (&optional n)
                              (interactive "p")
                              (insert-bracket 35 n)))

If you are using paredit mode and don't like this to be mapped
globally then this applies it only for buffers with paredit mode:
(define-key paredit-mode-map (kbd "M-3") (lambda (&optional n)
                              (interactive "p")
                              (insert-bracket 35 n)))

Lauri

On Mon, Dec 7, 2009 at 1:15 PM, Lauri Pesonen <lauri.peso...@iki.fi> wrote:
> Thanks everyone for the recommendations.
>
> 2009/12/4 Steve Purcell <st...@sanityinc.com>:
>>
>> Here's what I do (in Cocoa Emacs 23) to make 'option' work the same in Emacs 
>> as in other OS X apps:
>>
>>  (setq mac-command-modifier 'meta)
>>  (setq mac-option-modifier 'none)
>>  (setq default-input-method "MacOSX")
>
> Hmm, I've tried to avoid doing this since I'm used to Option being the
> Meta key (IIRC that's the default both in Cocoa Emacs and Aquamacs).
>
> I'm just surprised how no one seems to have a good answer for this.
> I've googled for it and trawled through Stack overflow and all the
> "solutions" are all hacks. The same issue comes up in Terminal where
> in the settings you can bind Option to meta (you can then use emacsy
> meta shortcuts like meta-f forward-word in the shell), but this will
> again result in # not being available. Maybe switching to a US keymap
> is the easiest way around this... It's just surprising to me that the
> hash key, which is used in so many programming languages, is broken by
> default on OS X in the UK.
>
>> (My full emacs config tree is here: http://github.com/purcell/emacs.d)
>
> I'll have a look. And thanks again to everyone who replied.
>
>> -Steve
>
> --
>  ! Lauri
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to