Based on the discussion in these questions (1, 2, 3), I created the following key bindings for AucTeX in emacs.
(defun AucTeX-LaTeX-beginendgroup ()
(local-set-key (kbd "C-{") "\\begingroup
")
(local-set-key (kbd "C-}") "\\endgroup
"))
(add-hook 'LaTeX-mode-hook 'AucTeX-LaTeX-beginendgroup)
I wanted to create key binding in AucTeX to input text \begingroup RET
when Ctrl-{
is pressed, and input \endgroup RET
when Ctrl-}
is pressed.
Emacs loads the style mode hooks successfully without any complaints.
While the first one (Ctrl-{
), works fine (also C-h k C-{
reports correctly), the second one (Ctrl-}
) does not work. Moreover, C-h k C-}
remains silent without an answer.
I am really clueless about what could have gone wrong.
(insert
the given string. – Andrew Swann Nov 14 '14 at 8:18self-insert-command
. emacs.stackexchange.com/a/3530/184 – T. Verron Nov 14 '14 at 12:26