R – Carbon-emacs: re-enable hash key

carbon-emacsemacsmacos

How can I re-enable the hash (#) key in carbon-emacs on the mac? I've tried everything I've come across in google and still can't get it working.

My config file currently looks like this:

(require 'redo+)
(require 'mac-key-mode)
(mac-key-mode 1)
(setq default-input-method "MacOSX")
(setq mac-command-modifier 'alt mac-option-modifier 'meta)

The above has enabled all the Command+Key bindings (such as Cmd+S for saving), but Alt+3 isn't working.

I'd normally work around it but I'm programming in Python and # is rather useful for comments! 😉

Best Answer

How about adding this to .emacs, setting up a macro and then binding M-3 to it:

(fset 'insertPound
   "#")
(global-set-key (kbd "M-3") 'insertPound)
Related Topic