electric-align
electric-align copied to clipboard
if electric-align-mode is enabled, abbrevs don't work anymore
I've configured electric-align-mode like so:
(defun add-something-to-mode-hooks (mode-list something)
"helper function to add a callback to multiple hooks"
(dolist (mode mode-list)
(add-hook (intern (concat (symbol-name mode) "-mode-hook")) something)))
(require 'electric-align)
(add-something-to-mode-hooks '(c c++ cperl vala emacs-lisp python) 'electric-align-mode)
I realized that abbrevs don't work anymore in cperl-mode today where I have cperl-electric-keywords
enabled. Also, my own abbrevs don't work.
If I disable electric-align-mode, everything works as it should.
Otherwise thanks for this awesome mode, I love it!
- Tom
SPC
is bound to self-insert-command
by default, and electric-align-mode
basically overrides the SPC
key to electric-align-SPC
command.
I suspect that cperl-mode
hooks some functions to self-insert-command
so it does not work while electric-align-mode
is turned on.
I think we can fix this by
- make
electric-align-mode
not to override the default bindings
or
- add a workaround to
cperl-mode
to hook the functions not only toself-insert-command
butelectric-align-SPC
but anyway we should look into cperl-mode
more.
I cannot fix this soon but thank you for your report.
I've got the same problem with python-mode, although SPC there is bound to electric-align-SPC
. To be sure it's not a problem with my config, I started emacs with -Q and loaded python-mode and electric-align-mode in a python buffer.