With my "powers" I am unable to fix a little error in Tyler code. Here I partly rewrite it and I give a solution for the second part of the question too.
Redefine AUCTeX font keybindings
Assume we want to set these font bindings (but you can modify them at will):
Italic "\C-ci" Bold "\C-cb" Typewriter "\C-ct" Emphasis "\C-ce" Smallcaps "\C-cs"
Add these line to your init.el
, or whatever the name of your Emacs init file:
(defun TeX-italic()
(interactive)
(TeX-font nil ?\C-i))
(defun TeX-bold()
(interactive)
(TeX-font nil ?\C-b))
(defun TeX-typewriter()
(interactive)
(TeX-font nil ?\C-t))
(defun TeX-emphasis()
(interactive)
(TeX-font nil ?\C-e))
(defun TeX-smallcaps()
(interactive)
(TeX-font nil ?\C-c))
(defun latex-font-hook ()
(local-set-key "\C-ci" 'TeX-italic)
(local-set-key "\C-cb" 'TeX-bold)
(local-set-key "\C-ct" 'TeX-typewriter)
(local-set-key "\C-ce" 'TeX-emphasis)
(local-set-key "\C-cs" 'TeX-smallcaps))
(add-hook 'LaTeX-mode-hook 'latex-font-hook)
If you are dissatisfied with the keys used here, change the first argument of local-set-key
as you like it, e.g. set (local-set-key "\C-b" 'TeX-bold)
to bind to Control-b.
Redefine AUCTeX compile keybinding
To modify the C-c C-c
keybinding and possibly to meliorate the bound compilation function (TeX-command-master
), please see my post Build & view.