So when editing Django templates I have noticed that web-mode will auto-complete certain tags. This is awesome, except that this functionality seems to conflict with autopair-mode by placing an extra close bracket like so:
{% block title %}} <--- '%}' closing brace is added by web-mode, second '}' is added by autopair-mode
For simplicity's sake I decided to enable autopair-mode globally in my .emacs like so:
(require 'autopair)
(autopair-global-mode) ;; to enable in all buffers.
Realizing the conflict I added the following web-mode-hook
to (in theory) disable autopair-mode when entering web-mode:
(add-hook 'web-mode-hook
#'(lamda () (autopair-mode -1)))
I am using emacs24 and this should work according to the simple documentation on autopair-mode's git repo...but I am noticing that autopair-mode is still being enabled by default when entering web-mode.
I am thinking there is some sort of inheritance in elisp that I don't know about...so I thought I would ask the question here.
For reference, the exact order/snippet from my .emacs is as follows:
(require 'autopair)
(autopair-global-mode) ;; to enable in all buffers.
(add-hook 'web-mode-hook
#'(lamda () (autopair-mode -1)))