# HG changeset patch # User Andreas Schwab # Date 906109580 0 # Node ID 03626baa368ab81f34f80650734bb56aae76cb1e # Parent 5d2f6f759380d682c4c8220217bcbbba0c606a02 (compilation-error-screen-columns): New variable. (compilation-next-error-locus): Use it to decide whether to use forward-char or move-to-column. diff -r 5d2f6f759380 -r 03626baa368a lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Wed Sep 16 07:21:31 1998 +0000 +++ b/lisp/progmodes/compile.el Fri Sep 18 09:06:20 1998 +0000 @@ -353,6 +353,17 @@ Each elt has the form (REGEXP). This alist is by default empty, but if you have some good regexps here, the parsing of messages will be faster.") +(defcustom compilation-error-screen-columns t + "*If non-nil, column numbers in error messages are screen columns. +Otherwise they are interpreted as character positions, with +each character occupying one column. +The default is to use screen columns, which requires that the compilation +program and Emacs agree about the display width of the characters, +especially the TAB character." + :type 'boolean + :group 'compilation + :version "20.4") + (defcustom compilation-read-command t "*If not nil, M-x compile reads the compilation command to use. Otherwise, M-x compile just uses the value of `compile-command'." @@ -1497,7 +1508,9 @@ (goto-line last-line) (if (and column (> column 0)) ;; Columns in error msgs are 1-origin. - (forward-char (1- column)) + (if compilation-error-screen-columns + (move-to-column (1- column)) + (forward-char (1- column))) (beginning-of-line)) (setcdr next-error (point-marker)) ;; Make all the other error messages referring @@ -1521,7 +1534,9 @@ lines)) (forward-line lines)) (if (and column (> column 1)) - (forward-char (1- column)) + (if compilation-error-screen-columns + (move-to-column (1- column)) + (forward-char (1- column))) (beginning-of-line)) (setq last-line this) (setcdr (car errors) (point-marker))))