From 060c23ce272d3f9b7bf158cac48c7a1b30ad4515 Mon Sep 17 00:00:00 2001 Message-Id: <060c23ce272d3f9b7bf158cac48c7a1b30ad4515.1717788348.git.mdw@distorted.org.uk> From: Mark Wooding Date: Mon, 24 Jul 2017 12:12:39 +0100 Subject: [PATCH] el/dot-emacs.el: Fix tab key in TeX-ish modes. Organization: Straylight/Edgeware From: Mark Wooding 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. --- el/dot-emacs.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- [mdw]