aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Henoch2015-08-13 16:59:16 -0400
committerStefan Monnier2015-08-13 16:59:16 -0400
commitc24e742e00775a3e6964f32a521460345c9e07cb (patch)
tree5621053635771c2a57285eca2d0a20beb308a41e
parent0319f122def8890266f7462bd55ec0bc31045d97 (diff)
downloademacs-c24e742e00775a3e6964f32a521460345c9e07cb.tar.gz
emacs-c24e742e00775a3e6964f32a521460345c9e07cb.zip
* lisp/progmodes/compile.el: Assume 8-wide TABs (bug#21038)
* lisp/progmodes/compile.el: Use lexical-binding. (compilation-move-to-column): Assume 8-wide TABs (bug#21038).
-rw-r--r--lisp/progmodes/compile.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 9a4433595ef..9d1d14880e9 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1,4 +1,4 @@
1;;; compile.el --- run compiler as inferior of Emacs, parse error messages 1;;; compile.el --- run compiler as inferior of Emacs, parse error messages -*- lexical-binding:t -*-
2 2
3;; Copyright (C) 1985-1987, 1993-1999, 2001-2015 Free Software 3;; Copyright (C) 1985-1987, 1993-1999, 2001-2015 Free Software
4;; Foundation, Inc. 4;; Foundation, Inc.
@@ -1109,7 +1109,9 @@ If SCREEN is non-nil, columns are screen columns, otherwise, they are
1109just char-counts." 1109just char-counts."
1110 (setq col (- col compilation-first-column)) 1110 (setq col (- col compilation-first-column))
1111 (if screen 1111 (if screen
1112 (move-to-column (max col 0)) 1112 ;; Presumably, the compilation tool doesn't know about our current
1113 ;; `tab-width' setting, so it probably assumed 8-wide TABs (bug#21038).
1114 (let ((tab-width 8)) (move-to-column (max col 0)))
1113 (goto-char (min (+ (line-beginning-position) col) (line-end-position))))) 1115 (goto-char (min (+ (line-beginning-position) col) (line-end-position)))))
1114 1116
1115(defun compilation-internal-error-properties (file line end-line col end-col type fmts) 1117(defun compilation-internal-error-properties (file line end-line col end-col type fmts)