]> code.delx.au - gnu-emacs/commitdiff
* lisp/progmodes/compile.el: Assume 8-wide TABs (bug#21038)
authorMagnus Henoch <magnus.henoch@gmail.com>
Thu, 13 Aug 2015 20:59:16 +0000 (16:59 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 13 Aug 2015 20:59:16 +0000 (16:59 -0400)
* lisp/progmodes/compile.el: Use lexical-binding.
(compilation-move-to-column): Assume 8-wide TABs (bug#21038).

lisp/progmodes/compile.el

index 9a4433595ef9ac7d5ba56332b9df03c61b0746a6..9d1d14880e9d3dc45f78c9f1ce000369a36b1648 100644 (file)
@@ -1,4 +1,4 @@
-;;; compile.el --- run compiler as inferior of Emacs, parse error messages
+;;; compile.el --- run compiler as inferior of Emacs, parse error messages  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 1985-1987, 1993-1999, 2001-2015 Free Software
 ;; Foundation, Inc.
@@ -1109,7 +1109,9 @@ If SCREEN is non-nil, columns are screen columns, otherwise, they are
 just char-counts."
   (setq col (- col compilation-first-column))
   (if screen
-      (move-to-column (max col 0))
+      ;; Presumably, the compilation tool doesn't know about our current
+      ;; `tab-width' setting, so it probably assumed 8-wide TABs (bug#21038).
+      (let ((tab-width 8)) (move-to-column (max col 0)))
     (goto-char (min (+ (line-beginning-position) col) (line-end-position)))))
 
 (defun compilation-internal-error-properties (file line end-line col end-col type fmts)