Answers:
像这样:
(add-hook 'LaTeX-mode-hook 'my-latex-hook)
(defun my-latex-hook ()
(require 'tex-site)
(define-key LaTeX-mode-map "-" (lambda () (interactive) (insert "_")))
(define-key LaTeX-mode-map "_" (lambda () (interactive) (insert "-")))
(define-key LaTeX-mode-map "6" (lambda () (interactive) (insert "^")))
(define-key LaTeX-mode-map "^" (lambda () (interactive) (insert "6"))))
(define-key LaTeX-mode-map "-" "_")
等等就足够了("_"
将其解释为键盘宏),并且与配合使用TeX-electric-sub-and-superscript
。
_
和-
相互映射,则可以。