I recently got a new Chromebook and installed Ubuntu via crouton. I then installed Emacs 23 and transferred my .emacs file to the new machine. However, a few of my key rebindings have been overridden by definitions in the LaTeX major mode of the new installation. This did not happen on my previous computer (emacs 24.something). The three changes I would like to make are:
- When I press
[
, I want}
to display. - When I press
(
, I want{
to display. - When I press
$
, I want^
to display.
I have the following lines in my .emacs file (along with other similar lines that work as intended):
(global-set-key (kbd "[") '(lambda () (interactive) (princ "{" (get-buffer (current-buffer)))))
(global-set-key (kbd "(") '(lambda () (interactive) (princ "[" (get-buffer (current-buffer)))))
(global-set-key (kbd "$") '(lambda () (interactive) (princ "^" (get-buffer (current-buffer)))))
I only use Emacs for LaTeX, so I am not concerned with the fact that I am defining everything globally. Currently, if I use C-h k [
, I see that [
calls skeleton-pair-insert-maybe
instead of self-insert-command
, as expected (and similarly for the other two). All of my attempts to search on how to disable this returned only results talking about the usage of skeleton pairs and why one would want to use them, nothing about getting rid of them. Similarly, I have been unable to find a way to edit the LaTeX major mode to remove the lines that bind this function in the first place.
Any method which allows me to redefine these keys over the LaTeX major mode, or to change the LaTeX major mode, would be appreciated.