diff options
| author | Stefan Monnier | 2004-04-08 22:16:14 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-04-08 22:16:14 +0000 |
| commit | 91fa27cd3227261dc694a54b069963e9448eb407 (patch) | |
| tree | 888c7b2a8c1969495a03932c98c9632ce809735f | |
| parent | 91e88cea86c6e4b87f70ec05244f4af716ace19a (diff) | |
| download | emacs-91fa27cd3227261dc694a54b069963e9448eb407.tar.gz emacs-91fa27cd3227261dc694a54b069963e9448eb407.zip | |
(compilation-mode-font-lock-keywords):
Redo one more thing that I didn't notice Daniel had undone.
| -rw-r--r-- | lisp/ChangeLog | 18 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 132 |
2 files changed, 86 insertions, 64 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b9fe783b9d0..fd15aaf2004 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-04-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * progmodes/compile.el (compilation-mode-font-lock-keywords): | ||
| 4 | Redo one more thing that I didn't notice Daniel had undone. | ||
| 5 | |||
| 1 | 2004-04-08 Nick Roberts <nick@nick.uklinux.net> | 6 | 2004-04-08 Nick Roberts <nick@nick.uklinux.net> |
| 2 | 7 | ||
| 3 | * progmodes/gdb-ui.el (gdb-source-window): Remove variable | 8 | * progmodes/gdb-ui.el (gdb-source-window): Remove variable |
| @@ -87,6 +92,19 @@ | |||
| 87 | * help-mode.el (help-function-def, help-variable-def): Handle hyperrefs | 92 | * help-mode.el (help-function-def, help-variable-def): Handle hyperrefs |
| 88 | to C source files specially. | 93 | to C source files specially. |
| 89 | 94 | ||
| 95 | 2004-04-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 96 | |||
| 97 | * progmodes/compile.el: Require CL. | ||
| 98 | (compilation-mode-font-lock-keywords): Re-install the "line as | ||
| 99 | function" patch. | ||
| 100 | |||
| 101 | * help-fns.el (help-C-source-directory): New var. | ||
| 102 | (help-subr-name, help-C-file-name, help-find-C-source): New funs. | ||
| 103 | (describe-function-1, describe-variable): Use them. | ||
| 104 | |||
| 105 | * help-mode.el (help-function-def, help-variable-def): Handle hyperrefs | ||
| 106 | to C source files specially. | ||
| 107 | |||
| 90 | 2004-04-07 Jan Nieuwenhuizen <janneke@gnu.org> | 108 | 2004-04-07 Jan Nieuwenhuizen <janneke@gnu.org> |
| 91 | 109 | ||
| 92 | * info.el (Info-hide-cookies-node): New function. | 110 | * info.el (Info-hide-cookies-node): New function. |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index e1c64392e75..9d2544628d0 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -650,72 +650,76 @@ Faces `compilation-error-face', `compilation-warning-face', | |||
| 650 | 650 | ||
| 651 | (defun compilation-mode-font-lock-keywords () | 651 | (defun compilation-mode-font-lock-keywords () |
| 652 | "Return expressions to highlight in Compilation mode." | 652 | "Return expressions to highlight in Compilation mode." |
| 653 | (nconc | 653 | (if compilation-parse-errors-function |
| 654 | ;; make directory tracking | 654 | ;; An old package! Try the compatibility code. |
| 655 | (if compilation-directory-matcher | 655 | '((compilation-compat-parse-errors)) |
| 656 | `((,(car compilation-directory-matcher) | 656 | (append |
| 657 | ,@(mapcar (lambda (elt) | 657 | ;; make directory tracking |
| 658 | `(,(car elt) | 658 | (if compilation-directory-matcher |
| 659 | (compilation-directory-properties | 659 | `((,(car compilation-directory-matcher) |
| 660 | ,(car elt) ,(cdr elt)) | 660 | ,@(mapcar (lambda (elt) |
| 661 | t)) | 661 | `(,(car elt) |
| 662 | (cdr compilation-directory-matcher))))) | 662 | (compilation-directory-properties |
| 663 | 663 | ,(car elt) ,(cdr elt)) | |
| 664 | ;; Compiler warning/error lines. | 664 | t)) |
| 665 | (mapcar (lambda (item) | 665 | (cdr compilation-directory-matcher))))) |
| 666 | (if (symbolp item) | 666 | |
| 667 | (setq item (cdr (assq item | 667 | ;; Compiler warning/error lines. |
| 668 | compilation-error-regexp-alist-alist)))) | 668 | (mapcar |
| 669 | (let ((file (nth 1 item)) | 669 | (lambda (item) |
| 670 | (line (nth 2 item)) | 670 | (if (symbolp item) |
| 671 | (col (nth 3 item)) | 671 | (setq item (cdr (assq item |
| 672 | (type (nth 4 item)) | 672 | compilation-error-regexp-alist-alist)))) |
| 673 | end-line end-col fmt) | 673 | (let ((file (nth 1 item)) |
| 674 | (if (consp file) (setq fmt (cdr file) file (car file))) | 674 | (line (nth 2 item)) |
| 675 | (if (consp line) (setq end-line (cdr line) line (car line))) | 675 | (col (nth 3 item)) |
| 676 | (if (consp col) (setq end-col (cdr col) col (car col))) | 676 | (type (nth 4 item)) |
| 677 | end-line end-col fmt) | ||
| 678 | (if (consp file) (setq fmt (cdr file) file (car file))) | ||
| 679 | (if (consp line) (setq end-line (cdr line) line (car line))) | ||
| 680 | (if (consp col) (setq end-col (cdr col) col (car col))) | ||
| 677 | 681 | ||
| 678 | (if (symbolp line) | 682 | (if (symbolp line) |
| 679 | ;; The old compile.el had here an undocumented hook that | 683 | ;; The old compile.el had here an undocumented hook that |
| 680 | ;; allowed `line' to be a function that computed the actual | 684 | ;; allowed `line' to be a function that computed the actual |
| 681 | ;; error location. Let's do our best. | 685 | ;; error location. Let's do our best. |
| 682 | `(,(car item) | 686 | `(,(car item) |
| 683 | (0 (compilation-compat-error-properties | 687 | (0 (compilation-compat-error-properties |
| 684 | (funcall ',line (list* (match-string ,file) | 688 | (funcall ',line (list* (match-string ,file) |
| 685 | default-directory | 689 | default-directory |
| 686 | ',(nthcdr 4 item)) | 690 | ',(nthcdr 4 item)) |
| 687 | ,(if col `(match-string ,col))))) | 691 | ,(if col `(match-string ,col))))) |
| 688 | (,file compilation-error-face t)) | 692 | (,file compilation-error-face t)) |
| 689 | 693 | ||
| 690 | `(,(nth 0 item) | 694 | `(,(nth 0 item) |
| 691 | 695 | ||
| 692 | ,@(when (integerp file) | 696 | ,@(when (integerp file) |
| 693 | `((,file ,(if (consp type) | 697 | `((,file ,(if (consp type) |
| 694 | `(compilation-face ',type) | 698 | `(compilation-face ',type) |
| 695 | (aref [compilation-info-face | 699 | (aref [compilation-info-face |
| 696 | compilation-warning-face | 700 | compilation-warning-face |
| 697 | compilation-error-face] | 701 | compilation-error-face] |
| 698 | (or type 2)))))) | 702 | (or type 2)))))) |
| 699 | 703 | ||
| 700 | ,@(when line | 704 | ,@(when line |
| 701 | `((,line compilation-line-face nil t))) | 705 | `((,line compilation-line-face nil t))) |
| 702 | ,@(when end-line | 706 | ,@(when end-line |
| 703 | `((,end-line compilation-line-face nil t))) | 707 | `((,end-line compilation-line-face nil t))) |
| 704 | 708 | ||
| 705 | ,@(when col | 709 | ,@(when col |
| 706 | `((,col compilation-column-face nil t))) | 710 | `((,col compilation-column-face nil t))) |
| 707 | ,@(when end-col | 711 | ,@(when end-col |
| 708 | `((,end-col compilation-column-face nil t))) | 712 | `((,end-col compilation-column-face nil t))) |
| 709 | 713 | ||
| 710 | ,@(nthcdr 6 item) | 714 | ,@(nthcdr 6 item) |
| 711 | (,(or (nth 5 item) 0) | 715 | (,(or (nth 5 item) 0) |
| 712 | (compilation-error-properties ',file ,line ,end-line | 716 | (compilation-error-properties ',file ,line ,end-line |
| 713 | ,col ,end-col ',(or type 2) | 717 | ,col ,end-col ',(or type 2) |
| 714 | ',fmt) | 718 | ',fmt) |
| 715 | append))))) ; for compilation-message-face | 719 | append))))) ; for compilation-message-face |
| 716 | compilation-error-regexp-alist) | 720 | compilation-error-regexp-alist) |
| 717 | 721 | ||
| 718 | compilation-mode-font-lock-keywords)) | 722 | compilation-mode-font-lock-keywords))) |
| 719 | 723 | ||
| 720 | 724 | ||
| 721 | ;;;###autoload | 725 | ;;;###autoload |