With AUCTeX I can add
(setq LaTeX-math-list '(
(?c "cong " nil)))
to my .emacs to make the minor mode LaTeX-math-mode spit out \cong
when it's triggered and I enter c.
I want it to be invoked with C-c instead of c but changing the code to
(setq LaTeX-math-list '(
(?C-c "cong " nil)))
gives me "Invalid read syntax: ?" when loading emacs. How do I make this work with C-c (or any other shifted binding such as M-c or C-M-c)?
The ?c
atom is Emacs way of indicating the single character c
. To use this syntax for control characters, you need to use ?\C-c
. Note that C-c
is a standard prefix key in Emacs, so using this particular key in LaTeX-math-list
may cause some conflicts. To use meta instead, you can use ?\M-c
Details are in the Elisp manual.
You can also use v
as a prefix key, if you define your shortcut as "v c"
for vc
, for example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With