el/dot-emacs.el: Fix tab key in TeX-ish modes.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 24 Jul 2017 11:12:39 +0000 (12:12 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 24 Jul 2017 11:12:39 +0000 (12:12 +0100)
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

index f64da0b..a96482f 100644 (file)
@@ -3158,7 +3158,7 @@ strip numbers instead."
   (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 @@ that character only to be normal punctuation.")
    "\\([ \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.