diff options
| author | Andreas Schwab | 1998-09-18 09:06:20 +0000 |
|---|---|---|
| committer | Andreas Schwab | 1998-09-18 09:06:20 +0000 |
| commit | f8e03ecbd33205b73cf81b79b93cb599b28767cd (patch) | |
| tree | f486531e90b9b7c0878b346f1bd125611b05b8c5 | |
| parent | 0dced2c95b42f9e34e08b45fac1170cb4e81a541 (diff) | |
| download | emacs-f8e03ecbd33205b73cf81b79b93cb599b28767cd.tar.gz emacs-f8e03ecbd33205b73cf81b79b93cb599b28767cd.zip | |
(compilation-error-screen-columns): New
variable.
(compilation-next-error-locus): Use it to decide whether to use
forward-char or move-to-column.
| -rw-r--r-- | lisp/progmodes/compile.el | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f3fcdb0b404..0be2b759bf9 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -353,6 +353,17 @@ Note that the match is done at the beginning of lines. | |||
| 353 | Each elt has the form (REGEXP). This alist is by default empty, but if | 353 | Each elt has the form (REGEXP). This alist is by default empty, but if |
| 354 | you have some good regexps here, the parsing of messages will be faster.") | 354 | you have some good regexps here, the parsing of messages will be faster.") |
| 355 | 355 | ||
| 356 | (defcustom compilation-error-screen-columns t | ||
| 357 | "*If non-nil, column numbers in error messages are screen columns. | ||
| 358 | Otherwise they are interpreted as character positions, with | ||
| 359 | each character occupying one column. | ||
| 360 | The default is to use screen columns, which requires that the compilation | ||
| 361 | program and Emacs agree about the display width of the characters, | ||
| 362 | especially the TAB character." | ||
| 363 | :type 'boolean | ||
| 364 | :group 'compilation | ||
| 365 | :version "20.4") | ||
| 366 | |||
| 356 | (defcustom compilation-read-command t | 367 | (defcustom compilation-read-command t |
| 357 | "*If not nil, M-x compile reads the compilation command to use. | 368 | "*If not nil, M-x compile reads the compilation command to use. |
| 358 | Otherwise, M-x compile just uses the value of `compile-command'." | 369 | Otherwise, M-x compile just uses the value of `compile-command'." |
| @@ -1497,7 +1508,9 @@ The current buffer should be the desired compilation output buffer." | |||
| 1497 | (goto-line last-line) | 1508 | (goto-line last-line) |
| 1498 | (if (and column (> column 0)) | 1509 | (if (and column (> column 0)) |
| 1499 | ;; Columns in error msgs are 1-origin. | 1510 | ;; Columns in error msgs are 1-origin. |
| 1500 | (forward-char (1- column)) | 1511 | (if compilation-error-screen-columns |
| 1512 | (move-to-column (1- column)) | ||
| 1513 | (forward-char (1- column))) | ||
| 1501 | (beginning-of-line)) | 1514 | (beginning-of-line)) |
| 1502 | (setcdr next-error (point-marker)) | 1515 | (setcdr next-error (point-marker)) |
| 1503 | ;; Make all the other error messages referring | 1516 | ;; Make all the other error messages referring |
| @@ -1521,7 +1534,9 @@ The current buffer should be the desired compilation output buffer." | |||
| 1521 | lines)) | 1534 | lines)) |
| 1522 | (forward-line lines)) | 1535 | (forward-line lines)) |
| 1523 | (if (and column (> column 1)) | 1536 | (if (and column (> column 1)) |
| 1524 | (forward-char (1- column)) | 1537 | (if compilation-error-screen-columns |
| 1538 | (move-to-column (1- column)) | ||
| 1539 | (forward-char (1- column))) | ||
| 1525 | (beginning-of-line)) | 1540 | (beginning-of-line)) |
| 1526 | (setq last-line this) | 1541 | (setq last-line this) |
| 1527 | (setcdr (car errors) (point-marker)))) | 1542 | (setcdr (car errors) (point-marker)))) |