Mercurial > emacs
comparison lisp/progmodes/compile.el @ 23263:03626baa368a
(compilation-error-screen-columns): New
variable.
(compilation-next-error-locus): Use it to decide whether to use
forward-char or move-to-column.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Fri, 18 Sep 1998 09:06:20 +0000 |
parents | 0aaa026229eb |
children | e5da22ef0b94 |
comparison
equal
deleted
inserted
replaced
23262:5d2f6f759380 | 23263:03626baa368a |
---|---|
350 ) | 350 ) |
351 "Alist specifying how to match lines that have no message. | 351 "Alist specifying how to match lines that have no message. |
352 Note that the match is done at the beginning of lines. | 352 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 | |
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") | |
355 | 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'." |
359 :type 'boolean | 370 :type 'boolean |
1495 (save-restriction | 1506 (save-restriction |
1496 (widen) | 1507 (widen) |
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 |
1504 ;; to the same file have markers into the buffer. | 1517 ;; to the same file have markers into the buffer. |
1505 (while errors | 1518 (while errors |
1519 (re-search-forward "[\n\C-m]" | 1532 (re-search-forward "[\n\C-m]" |
1520 nil 'end | 1533 nil 'end |
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)))) |
1528 (setq errors (cdr errors))))))))) | 1543 (setq errors (cdr errors))))))))) |
1529 ;; If we didn't get a marker for this error, or this | 1544 ;; If we didn't get a marker for this error, or this |