Commit 2b1d2412 authored by Sam Steingold's avatar Sam Steingold
Browse files

(compilation-mode-font-lock-keywords): Omake sometimes indents the

errors it prints, so allow all regexps to start with spaces.
parent e0ab5fcf
2009-07-10 Sam Steingold <sds@gnu.org>
* progmodes/compile.el (compilation-mode-font-lock-keywords):
Omake sometimes indents the errors it prints, so allow all
regexps to start with spaces.
2009-07-10 Eli Zaretskii <eliz@gnu.org> 2009-07-10 Eli Zaretskii <eliz@gnu.org>
* cus-edit.el (customize-changed-options-previous-release): Bump * cus-edit.el (customize-changed-options-previous-release): Bump
......
...@@ -975,7 +975,17 @@ FMTS is a list of format specs for transforming the file name. ...@@ -975,7 +975,17 @@ FMTS is a list of format specs for transforming the file name.
(line (nth 2 item)) (line (nth 2 item))
(col (nth 3 item)) (col (nth 3 item))
(type (nth 4 item)) (type (nth 4 item))
(pat (car item))
end-line end-col fmt) end-line end-col fmt)
;; omake reports some error indented, so skip the indentation.
;; another solution is to modify (some?) regexps in
;; `compilation-error-regexp-alist'.
;; note that omake usage is not limited to ocaml and C (for stubs).
(unless (string-match (concat "^" (regexp-quote "^ *")) pat)
(setq pat (concat "^ *"
(if (= ?^ (aref pat 0))
(substring pat 1)
pat))))
(if (consp file) (setq fmt (cdr file) file (car file))) (if (consp file) (setq fmt (cdr file) file (car file)))
(if (consp line) (setq end-line (cdr line) line (car line))) (if (consp line) (setq end-line (cdr line) line (car line)))
(if (consp col) (setq end-col (cdr col) col (car col))) (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,7 +994,7 @@ FMTS is a list of format specs for transforming the file name.
;; The old compile.el had here an undocumented hook that ;; The old compile.el had here an undocumented hook that
;; allowed `line' to be a function that computed the actual ;; allowed `line' to be a function that computed the actual
;; error location. Let's do our best. ;; error location. Let's do our best.
`(,(car item) `(,pat
(0 (save-match-data (0 (save-match-data
(compilation-compat-error-properties (compilation-compat-error-properties
(funcall ',line (cons (match-string ,file) (funcall ',line (cons (match-string ,file)
...@@ -996,7 +1006,7 @@ FMTS is a list of format specs for transforming the file name. ...@@ -996,7 +1006,7 @@ FMTS is a list of format specs for transforming the file name.
(unless (or (null (nth 5 item)) (integerp (nth 5 item))) (unless (or (null (nth 5 item)) (integerp (nth 5 item)))
(error "HYPERLINK should be an integer: %s" (nth 5 item))) (error "HYPERLINK should be an integer: %s" (nth 5 item)))
`(,(nth 0 item) `(,pat
,@(when (integerp file) ,@(when (integerp file)
`((,file ,(if (consp type) `((,file ,(if (consp type)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment