comparison lisp/progmodes/compile.el @ 90199:bb71c6cf2009

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-67 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 447-458) - Update from CVS - Update from CVS: lisp/subr.el (add-to-ordered-list): Doc fix. - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 83-85) - Merge from emacs--cvs-trunk--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 30 Jun 2005 00:31:46 +0000
parents a1b34dec1104 015343385a78
children f9a65d7ebd29
comparison
equal deleted inserted replaced
90198:97f6c3a96df1 90199:bb71c6cf2009
491 :group 'font-lock-highlighting-faces 491 :group 'font-lock-highlighting-faces
492 :version "22.1") 492 :version "22.1")
493 ;; backward-compatibility alias 493 ;; backward-compatibility alias
494 (put 'compilation-info-face 'face-alias 'compilation-info) 494 (put 'compilation-info-face 'face-alias 'compilation-info)
495 495
496 (defface compilation-error-file-name
497 '((default :inherit font-lock-warning-face)
498 (((supports :underline t)) :underline t))
499 "Face for displaying file names in compilation errors."
500 :group 'font-lock-highlighting-faces
501 :version "22.1")
502
503 (defface compilation-warning-file-name
504 '((default :inherit font-lock-warning-face)
505 (((supports :underline t)) :underline t))
506 "Face for displaying file names in compilation errors."
507 :group 'font-lock-highlighting-faces
508 :version "22.1")
509
510 (defface compilation-info-file-name
511 '((default :inherit compilation-info)
512 (((supports :underline t)) :underline t))
513 "Face for displaying file names in compilation errors."
514 :group 'font-lock-highlighting-faces
515 :version "22.1")
516
517 (defface compilation-line-number
518 '((default :inherit font-lock-variable-name-face)
519 (((supports :underline t)) :underline t))
520 "Face for displaying file names in compilation errors."
521 :group 'font-lock-highlighting-faces
522 :version "22.1")
523
524 (defface compilation-column-number
525 '((default :inherit font-lock-type-face)
526 (((supports :underline t)) :underline t))
527 "Face for displaying file names in compilation errors."
528 :group 'font-lock-highlighting-faces
529 :version "22.1")
530
496 (defvar compilation-message-face nil 531 (defvar compilation-message-face nil
497 "Face name to use for whole messages. 532 "Face name to use for whole messages.
498 Faces `compilation-error-face', `compilation-warning-face', 533 Faces `compilation-error-face', `compilation-warning-face',
499 `compilation-info-face', `compilation-line-face' and 534 `compilation-info-face', `compilation-line-face' and
500 `compilation-column-face' get prepended to this, when applicable.") 535 `compilation-column-face' get prepended to this, when applicable.")
501 536
502 (defvar compilation-error-face 'font-lock-warning-face 537 (defvar compilation-error-face 'compilation-error-file-name
503 "Face name to use for file name in error messages.") 538 "Face name to use for file name in error messages.")
504 539
505 (defvar compilation-warning-face 'compilation-warning 540 (defvar compilation-warning-face 'compilation-warning-file-name
506 "Face name to use for file name in warning messages.") 541 "Face name to use for file name in warning messages.")
507 542
508 (defvar compilation-info-face 'compilation-info 543 (defvar compilation-info-face 'compilation-info-file-name
509 "Face name to use for file name in informational messages.") 544 "Face name to use for file name in informational messages.")
510 545
511 (defvar compilation-line-face 'font-lock-variable-name-face 546 (defvar compilation-line-face 'compilation-line-number
512 "Face name to use for line number in message.") 547 "Face name to use for line number in message.")
513 548
514 (defvar compilation-column-face 'font-lock-type-face 549 (defvar compilation-column-face 'compilation-column-number
515 "Face name to use for column number in message.") 550 "Face name to use for column number in message.")
516 551
517 ;; same faces as dired uses 552 ;; same faces as dired uses
518 (defvar compilation-enter-directory-face 'font-lock-function-name-face 553 (defvar compilation-enter-directory-face 'font-lock-function-name-face
519 "Face name to use for column number in message.") 554 "Face name to use for column number in message.")
1340 (setq mode-line-process (format ":%s [%s]" process-status (cdr status))) 1375 (setq mode-line-process (format ":%s [%s]" process-status (cdr status)))
1341 ;; Force mode line redisplay soon. 1376 ;; Force mode line redisplay soon.
1342 (force-mode-line-update) 1377 (force-mode-line-update)
1343 (if (and opoint (< opoint omax)) 1378 (if (and opoint (< opoint omax))
1344 (goto-char opoint)) 1379 (goto-char opoint))
1345 (if compilation-finish-function 1380 (with-no-warnings
1346 (funcall compilation-finish-function (current-buffer) msg)) 1381 (if compilation-finish-function
1382 (funcall compilation-finish-function (current-buffer) msg)))
1347 (let ((functions compilation-finish-functions)) 1383 (let ((functions compilation-finish-functions))
1348 (while functions 1384 (while functions
1349 (funcall (car functions) (current-buffer) msg) 1385 (funcall (car functions) (current-buffer) msg)
1350 (setq functions (cdr functions)))))) 1386 (setq functions (cdr functions))))))
1351 1387
1499 (defun compilation-find-buffer (&optional avoid-current) 1535 (defun compilation-find-buffer (&optional avoid-current)
1500 (next-error-find-buffer avoid-current 'compilation-buffer-internal-p)) 1536 (next-error-find-buffer avoid-current 'compilation-buffer-internal-p))
1501 1537
1502 ;;;###autoload 1538 ;;;###autoload
1503 (defun compilation-next-error-function (n &optional reset) 1539 (defun compilation-next-error-function (n &optional reset)
1540 "Advance to the next error message and visit the file where the error was.
1541 This is the value of `next-error-function' in Compilation buffers."
1504 (interactive "p") 1542 (interactive "p")
1505 (set-buffer (compilation-find-buffer))
1506 (when reset 1543 (when reset
1507 (setq compilation-current-error nil)) 1544 (setq compilation-current-error nil))
1508 (let* ((columns compilation-error-screen-columns) ; buffer's local value 1545 (let* ((columns compilation-error-screen-columns) ; buffer's local value
1509 (last 1) 1546 (last 1)
1510 (loc (compilation-next-error (or n 1) nil 1547 (loc (compilation-next-error (or n 1) nil