joaotavora / autopair

Automagically pair braces and quotes in emacs like TextMate
208 stars 35 forks source link

autopair-global-mode duplicates all input in calc-mode #17

Closed vkurup closed 10 years ago

vkurup commented 11 years ago

This is the same issue as Issue 47 on the old google code tracker.

  1. Enable autopair-global-mode
  2. M-x calc
  3. Type any digit and hit enter

Expect: digit to be entered once Actual: digit is entered twice Emacs version 24.3.1

This workaround fixes it: (add-hook 'calc-mode-hook #'(lambda () (autopair-global-mode -1)))

Note, that autopair-global-mode has to be unset in the hook, not autopair-mode (as recommended in the docs)

joaotavora commented 11 years ago

I've duplicated the issue, but as you must understand that "work around" disables autopair everywhere, it's not really a workaround. I'll try to resolve it when I find the time :-)

vkurup commented 11 years ago

Ahhh... thank you for pointing that out. My "workaround" completely disables autopair. Oops :)

joaotavora commented 10 years ago

Have you tried (add-hook 'calc-mode-hook #'(lambda () (autopair-mode -1))) with the latest version of autopair. That would disable autopair only in calc-mode, and seems to be working.

vkurup commented 10 years ago

Yes, thank you. I did find that to work, but forgot to report back: https://github.com/vkurup/dotfiles/blob/master/.emacs.d/init.el#L36