I have inserted the following code in my init file. This code insert a space+\ (ie, " \") when typing \
in a buffer.
Despite the fact that the function ddd
works without problem in any buffer, the shortcut \
doesn't work when the file is in LaTeX mode (AUCTeX).
Is there any solution to solve this problem, i.e. typing \
executes the function ddd
? The function ddd
is just an example, the same problem occurs for any function I bind to the backslash.
(defun ddd ()
"Insert a dollar sign with a space in front."
(interactive)
(insert " \\"))
(global-set-key (kbd "\\") 'ddd)