summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cc-defs.el2
-rw-r--r--lisp/progmodes/cc-engine.el35
-rw-r--r--lisp/progmodes/compile.el30
-rw-r--r--lisp/progmodes/simula.el2
4 files changed, 50 insertions, 19 deletions
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 5ca64a0a752..12be09d9b45 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -1278,7 +1278,7 @@ point is then left undefined."
place ,property nil ,(or limit '(point-min)))))
(when (> place ,(or limit '(point-min)))
(goto-char place)
- (search-backward-regexp "\\(n\\|.\\)") ; to set the match-data.
+ (search-backward-regexp "\\(\n\\|.\\)") ; to set the match-data.
(point))))
(defun c-clear-char-property-with-value-function (from to property value)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 0964c04b899..0c338fa3868 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -327,6 +327,8 @@ comment at the start of cc-engine.el for more info."
(when (or (null lim)
(>= here lim))
(save-match-data
+ ;; Note the similarity of the code here to some in
+ ;; `c-backward-sws'.
(while
(progn
(while (eq (char-before (1- (point))) ?\\)
@@ -2461,17 +2463,34 @@ comment at the start of cc-engine.el for more info."
(/= cmt-skip-pos simple-ws-beg)
(c-beginning-of-macro))
;; Inside a cpp directive. See if it should be skipped over.
- (let ((cpp-beg (point)))
+ (let ((cpp-beg (point))
+ pause pos)
- ;; Move back over all line continuations in the region skipped
- ;; over by `c-backward-comments'. If we go past it then we
- ;; started inside the cpp directive.
+ ;; Move back over all line continuations and block comments in
+ ;; the region skipped over by `c-backward-comments'. If we go
+ ;; past it then we started inside the cpp directive.
(goto-char simple-ws-beg)
(beginning-of-line)
- (while (and (> (point) cmt-skip-pos)
- (progn (backward-char)
- (eq (char-before) ?\\)))
- (beginning-of-line))
+ ;; Note the similarity of the code here to some in
+ ;; `c-beginning-of-macro'.
+ (setq pause (point))
+ (while
+ (progn
+ (while (and (> (point) cmt-skip-pos)
+ (progn (backward-char)
+ (eq (char-before) ?\\)))
+ (beginning-of-line))
+ (setq pos (point))
+ (when (and c-last-c-comment-end-on-line-re
+ (re-search-forward
+ c-last-c-comment-end-on-line-re pause t))
+ (goto-char (match-end 1))
+ (if (c-backward-single-comment)
+ (progn
+ (beginning-of-line)
+ (setq pause (point)))
+ (goto-char pos)
+ nil))))
(if (< (point) cmt-skip-pos)
;; Don't move past the cpp directive if we began inside
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 48ac85a73b7..455f181f501 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -221,7 +221,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
;; considered before EDG.
;; The message may be a "warning", "error", or "fatal error" with
;; an error code, or "see declaration of" without an error code.
- "^ *\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) ?\
+ "^ *\\([0-9]+>\\)?\\(\\(?:[a-zA-Z]:\\)?[^ :(\t\n][^:(\t\n]*\\)(\\([0-9]+\\)) ?\
: \\(?:see declaration\\|\\(?:warnin\\(g\\)\\|[a-z ]+\\) C[0-9]+:\\)"
2 3 nil (4))
@@ -268,12 +268,24 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
(jikes-file
"^\\(?:Found\\|Issued\\) .* compiling \"\\(.+\\)\":$" 1 nil nil 0)
-
- ;; This used to be pathologically slow on long lines (Bug#3441),
- ;; due to matching filenames via \\(.*?\\). This might be faster.
(maven
;; Maven is a popular free software build tool for Java.
- "\\(\\[WARNING\\] *\\)?\\([^ \n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\] " 2 3 4 (1))
+ ,(rx bol
+ ;; It is unclear whether the initial [type] tag is always present.
+ (? "["
+ (or "ERROR" (group-n 1 "WARNING") (group-n 2 "INFO"))
+ "] ")
+ (group-n 3 ; File
+ (not (any "\n ["))
+ (* (or (not (any "\n :"))
+ (: " " (not (any "\n/-")))
+ (: ":" (not (any "\n ["))))))
+ ":["
+ (group-n 4 (+ digit)) ; Line
+ ","
+ (group-n 5 (+ digit)) ; Column
+ "] ")
+ 3 4 5 (1 . 2))
(jikes-line
"^ *\\([0-9]+\\)\\.[ \t]+.*\n +\\(<-*>\n\\*\\*\\* \\(?:Error\\|Warnin\\(g\\)\\)\\)"
@@ -294,7 +306,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
1 2 3 (4 . 5))
(ruby-Test::Unit
- "^[\t ]*\\[\\([^(].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2)
+ "^ [[ ]?\\([^ (].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2)
(gmake
;; Set GNU make error messages as INFO level.
@@ -394,7 +406,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
(omake
;; "omake -P" reports "file foo changed"
;; (useful if you do "cvs up" and want to see what has changed)
- "omake: file \\(.*\\) changed" 1 nil nil nil nil
+ "^\\*\\*\\* omake: file \\(.*\\) changed" 1 nil nil nil nil
;; FIXME-omake: This tries to prevent reusing pre-existing markers
;; for subsequent messages, since those messages's line numbers
;; are about another version of the file.
@@ -443,7 +455,7 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?"
"^\\([^, \n\t]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., (-]" 1 2 3)
(watcom
- "^[ \t]*\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)): ?\
+ "^[ \t]*\\(\\(?:[a-zA-Z]:\\)?[^ :(\t\n][^:(\t\n]*\\)(\\([0-9]+\\)): ?\
\\(?:\\(Error! E[0-9]+\\)\\|\\(Warning! W[0-9]+\\)\\):"
1 2 nil (4))
@@ -1441,7 +1453,7 @@ to `compilation-error-regexp-alist' if RULES is nil."
((not (memq 'omake compilation-error-regexp-alist)) nil)
((string-match "\\`\\([^^]\\|\\^\\( \\*\\|\\[\\)\\)" pat)
nil) ;; Not anchored or anchored but already allows empty spaces.
- (t (setq pat (concat "^ *" (substring pat 1)))))
+ (t (setq pat (concat "^\\(?: \\)?" (substring pat 1)))))
(if (consp file) (setq fmt (cdr file) file (car file)))
(if (consp line) (setq end-line (cdr line) line (car line)))
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el
index 5d5f180a5cf..be3edfdc6e4 100644
--- a/lisp/progmodes/simula.el
+++ b/lisp/progmodes/simula.el
@@ -367,7 +367,7 @@ Turning on SIMULA mode calls the value of the variable simula-mode-hook
with no arguments, if that value is non-nil."
(set (make-local-variable 'comment-column) 40)
;; (set (make-local-variable 'end-comment-column) 75)
- (set (make-local-variable 'paragraph-start) "[ \t]*$\\|\\f")
+ (set (make-local-variable 'paragraph-start) "[ \t]*$\\|\f")
(set (make-local-variable 'paragraph-separate) paragraph-start)
(set (make-local-variable 'indent-line-function) 'simula-indent-line)
(set (make-local-variable 'comment-start) "! ")