diff options
| author | Sam Steingold | 2009-10-12 21:04:15 +0000 |
|---|---|---|
| committer | Sam Steingold | 2009-10-12 21:04:15 +0000 |
| commit | 0cd16af4322df5df1fffe48931892f7d92a43f01 (patch) | |
| tree | 94f00787f818e75826c7344c52d1e109e91ce411 | |
| parent | cd29f88b1df50279f163621cffb807c81884d8c8 (diff) | |
| download | emacs-0cd16af4322df5df1fffe48931892f7d92a43f01.tar.gz emacs-0cd16af4322df5df1fffe48931892f7d92a43f01.zip | |
(compilation-mode-font-lock-keywords): Do not prepend "^ *" to
non-anchored patterns, like the perl one (bug#3928).
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 72b4848f595..58975e14f44 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,10 @@ | |||
| 1 | 2009-10-12 Sam Steingold <sds@gnu.org> | 1 | 2009-10-12 Sam Steingold <sds@gnu.org> |
| 2 | 2 | ||
| 3 | * progmodes/compile.el (compilation-next-error-function): Fix the | 3 | * progmodes/compile.el (compilation-next-error-function): Fix the |
| 4 | timestamps if the buffer has been visited before | 4 | timestamps if the buffer has been visited before. |
| 5 | |||
| 6 | (compilation-mode-font-lock-keywords): Do not prepend "^ *" to | ||
| 7 | non-anchored patterns, like the perl one (bug#3928). | ||
| 5 | 8 | ||
| 6 | 2009-10-12 Glenn Morris <rgm@gnu.org> | 9 | 2009-10-12 Glenn Morris <rgm@gnu.org> |
| 7 | 10 | ||
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 7b2d21cf310..c44ddfdb242 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -989,11 +989,10 @@ FMTS is a list of format specs for transforming the file name. | |||
| 989 | ;; another solution is to modify (some?) regexps in | 989 | ;; another solution is to modify (some?) regexps in |
| 990 | ;; `compilation-error-regexp-alist'. | 990 | ;; `compilation-error-regexp-alist'. |
| 991 | ;; note that omake usage is not limited to ocaml and C (for stubs). | 991 | ;; note that omake usage is not limited to ocaml and C (for stubs). |
| 992 | (unless (string-match (concat "^" (regexp-quote "^ *")) pat) | 992 | (when (and (= ?^ (aref pat 0)) ; anchored: starts with "^" |
| 993 | (setq pat (concat "^ *" | 993 | ;; but does not allow an arbitrary number of leading spaces |
| 994 | (if (= ?^ (aref pat 0)) | 994 | (not (and (= ? (aref pat 1)) (= ?* (aref pat 1))))) |
| 995 | (substring pat 1) | 995 | (setq pat (concat "^ *" (substring pat 1)))) |
| 996 | pat)))) | ||
| 997 | (if (consp file) (setq fmt (cdr file) file (car file))) | 996 | (if (consp file) (setq fmt (cdr file) file (car file))) |
| 998 | (if (consp line) (setq end-line (cdr line) line (car line))) | 997 | (if (consp line) (setq end-line (cdr line) line (car line))) |
| 999 | (if (consp col) (setq end-col (cdr col) col (car col))) | 998 | (if (consp col) (setq end-col (cdr col) col (car col))) |