From: Mark Wooding Date: Mon, 24 Jul 2017 11:12:39 +0000 (+0100) Subject: el/dot-emacs.el: Fix tab key in TeX-ish modes. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/060c23ce272d3f9b7bf158cac48c7a1b30ad4515 el/dot-emacs.el: Fix tab key in TeX-ish modes. I think having TAB bound to `indent-for-tab-command' is after all a good thing, and I should put it back. But `indent-relative' is also useful, so put that on M-TAB. This means defeating Flyspell's use of this key to mean the same as C-. (`flyspell-auto-correct-word'), which (a) is already on a different key too, and (b) I didn't know existed so I'm not going to miss it. --- diff --git a/el/dot-emacs.el b/el/dot-emacs.el index f64da0b..a96482f 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -3158,7 +3158,7 @@ (defun mdw-fontify-tex () (local-set-key [?$] 'self-insert-command) ;; Make `tab' be useful, given that tab stops in TeX don't work well. - (local-set-key "\C-i" 'indent-relative) + (local-set-key "\C-\M-i" 'indent-relative) (setq indent-tabs-mode nil) ;; Set fill prefix. @@ -3677,6 +3677,9 @@ (defun mdw-text-mode () "\\([ \t]*\\([>#|:] ?\\)*[ \t]*\\)" 3) (auto-fill-mode 1)) +(eval-after-load "flyspell" + '(define-key flyspell-mode-map "\C-\M-i" nil)) + ;;;-------------------------------------------------------------------------- ;;; Outline and hide/show modes.