aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2009-07-10 18:23:49 +0000
committerSam Steingold2009-07-10 18:23:49 +0000
commit2b1d2412c56b95dcbc0c158105a74573ca362c32 (patch)
tree7553d61cf211ee5e04b39e2af70c9ce014ee718c
parente0ab5fcf0422af43346a6726cc445e567f820d30 (diff)
downloademacs-2b1d2412c56b95dcbc0c158105a74573ca362c32.tar.gz
emacs-2b1d2412c56b95dcbc0c158105a74573ca362c32.zip
(compilation-mode-font-lock-keywords): Omake sometimes indents the
errors it prints, so allow all regexps to start with spaces.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/compile.el14
2 files changed, 18 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d7c9348c99a..2f2c72ca405 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12009-07-10 Sam Steingold <sds@gnu.org>
2
3 * progmodes/compile.el (compilation-mode-font-lock-keywords):
4 Omake sometimes indents the errors it prints, so allow all
5 regexps to start with spaces.
6
12009-07-10 Eli Zaretskii <eliz@gnu.org> 72009-07-10 Eli Zaretskii <eliz@gnu.org>
2 8
3 * cus-edit.el (customize-changed-options-previous-release): Bump 9 * cus-edit.el (customize-changed-options-previous-release): Bump
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 11428d2fe7a..cad19b70674 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -975,7 +975,17 @@ FMTS is a list of format specs for transforming the file name.
975 (line (nth 2 item)) 975 (line (nth 2 item))
976 (col (nth 3 item)) 976 (col (nth 3 item))
977 (type (nth 4 item)) 977 (type (nth 4 item))
978 (pat (car item))
978 end-line end-col fmt) 979 end-line end-col fmt)
980 ;; omake reports some error indented, so skip the indentation.
981 ;; another solution is to modify (some?) regexps in
982 ;; `compilation-error-regexp-alist'.
983 ;; note that omake usage is not limited to ocaml and C (for stubs).
984 (unless (string-match (concat "^" (regexp-quote "^ *")) pat)
985 (setq pat (concat "^ *"
986 (if (= ?^ (aref pat 0))
987 (substring pat 1)
988 pat))))
979 (if (consp file) (setq fmt (cdr file) file (car file))) 989 (if (consp file) (setq fmt (cdr file) file (car file)))
980 (if (consp line) (setq end-line (cdr line) line (car line))) 990 (if (consp line) (setq end-line (cdr line) line (car line)))
981 (if (consp col) (setq end-col (cdr col) col (car col))) 991 (if (consp col) (setq end-col (cdr col) col (car col)))
@@ -984,7 +994,7 @@ FMTS is a list of format specs for transforming the file name.
984 ;; The old compile.el had here an undocumented hook that 994 ;; The old compile.el had here an undocumented hook that
985 ;; allowed `line' to be a function that computed the actual 995 ;; allowed `line' to be a function that computed the actual
986 ;; error location. Let's do our best. 996 ;; error location. Let's do our best.
987 `(,(car item) 997 `(,pat
988 (0 (save-match-data 998 (0 (save-match-data
989 (compilation-compat-error-properties 999 (compilation-compat-error-properties
990 (funcall ',line (cons (match-string ,file) 1000 (funcall ',line (cons (match-string ,file)
@@ -996,7 +1006,7 @@ FMTS is a list of format specs for transforming the file name.
996 (unless (or (null (nth 5 item)) (integerp (nth 5 item))) 1006 (unless (or (null (nth 5 item)) (integerp (nth 5 item)))
997 (error "HYPERLINK should be an integer: %s" (nth 5 item))) 1007 (error "HYPERLINK should be an integer: %s" (nth 5 item)))
998 1008
999 `(,(nth 0 item) 1009 `(,pat
1000 1010
1001 ,@(when (integerp file) 1011 ,@(when (integerp file)
1002 `((,file ,(if (consp type) 1012 `((,file ,(if (consp type)