Mercurial > emacs
changeset 110266:5086e18330fb
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Not a const.
(compilation-error-regexp-alist-alist): Rule out ": " in file names
for the `gnu' messages.
(compilation-set-skip-threshold): New command.
(compilation-start): Use \' rather than $.
(compilation-forget-errors): Use clrhash.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 08 Sep 2010 17:53:08 +0200 |
parents | 737d37e262a1 |
children | bd6932be9441 |
files | lisp/ChangeLog lisp/progmodes/compile.el |
diffstat | 2 files changed, 39 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Sep 08 16:54:00 2010 +0200 +++ b/lisp/ChangeLog Wed Sep 08 17:53:08 2010 +0200 @@ -1,3 +1,13 @@ +2010-09-08 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/compile.el (compilation-error-regexp-alist-alist): + Not a const. + (compilation-error-regexp-alist-alist): Rule out ": " in file names + for the `gnu' messages. + (compilation-set-skip-threshold): New command. + (compilation-start): Use \' rather than $. + (compilation-forget-errors): Use clrhash. + 2010-09-08 Agustín Martín <agustin.martin@hispalinux.es> * textmodes/ispell.el (ispell-valid-dictionary-list): @@ -140,7 +150,7 @@ 2010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org> - * net/imap.el (imap-message-map): Removed optional buffer parameter, + * net/imap.el (imap-message-map): Remove optional buffer parameter, since no callers use it. (imap-message-get): Ditto. (imap-message-put): Ditto. @@ -151,11 +161,11 @@ 2010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org> - * net/imap.el (imap-fetch-safe): Removed function, and altered all + * net/imap.el (imap-fetch-safe): Remove function, and alter all callers to use `imap-fetch' instead. According to the comments, this should be safe, since all other IMAP clients use the 1:* syntax. - (imap-enable-exchange-bug-workaround): Removed. - (imap-debug): Removed -- doesn't seem very useful. + (imap-enable-exchange-bug-workaround): Remove. + (imap-debug): Remove -- doesn't seem very useful. 2010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
--- a/lisp/progmodes/compile.el Wed Sep 08 16:54:00 2010 +0200 +++ b/lisp/progmodes/compile.el Wed Sep 08 17:53:08 2010 +0200 @@ -164,7 +164,7 @@ (defvar compilation-num-errors-found) -(defconst compilation-error-regexp-alist-alist +(defvar compilation-error-regexp-alist-alist '((absoft "^\\(?:[Ee]rror on \\|[Ww]arning on\\( \\)\\)?[Ll]ine[ \t]+\\([0-9]+\\)[ \t]+\ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) @@ -263,9 +263,11 @@ ;; The core of the regexp is the one with *?. It says that a file name ;; can be composed of any non-newline char, but it also rules out some ;; valid but unlikely cases, such as a trailing space or a space - ;; followed by a -. + ;; followed by a -, or a colon followed by a space. + + ;; The "in \\|from " exception was added to handle messages from Ruby. "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\|[ \t]+\\(?:in \\|from \\)\\)?\ -\\([0-9]*[^0-9\n]\\(?:[^\n ]\\| [^-/\n]\\)*?\\): ?\ +\\([0-9]*[^0-9\n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\): ?\ \\([0-9]+\\)\\(?:\\([.:]\\)\\([0-9]+\\)\\)?\ \\(?:-\\([0-9]+\\)?\\(?:\\.\\([0-9]+\\)\\)?\\)?:\ \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\ @@ -766,12 +768,27 @@ skip anything less than warning or 0 -- don't skip any messages. Note that all messages not positively identified as warning or info, are considered errors." - :type '(choice (const :tag "Warnings and info" 2) - (const :tag "Info" 1) - (const :tag "None" 0)) + :type '(choice (const :tag "Skip warnings and info" 2) + (const :tag "Skip info" 1) + (const :tag "No skip" 0)) :group 'compilation :version "22.1") +(defun compilation-set-skip-threshold (level) + "Switch the `compilation-skip-threshold' level." + (interactive + (list + (mod (if current-prefix-arg + (prefix-numeric-value current-prefix-arg) + (1+ compilation-skip-threshold)) + 3))) + (setq compilation-skip-threshold level) + (message "Skipping %s" + (case compilation-skip-threshold + (0 "Nothing") + (1 "Info messages") + (2 "Warnings and info")))) + (defcustom compilation-skip-visited nil "Compilation motion commands skip visited messages if this is t. Visited messages are ones for which the file, line and column have been jumped @@ -1212,7 +1229,7 @@ (let* ((name-of-mode (if (eq mode t) "compilation" - (replace-regexp-in-string "-mode$" "" (symbol-name mode)))) + (replace-regexp-in-string "-mode\\'" "" (symbol-name mode)))) (thisdir default-directory) outwin outbuf) (with-current-buffer @@ -2377,7 +2394,7 @@ (defun compilation-forget-errors () ;; In case we hit the same file/line specs, we want to recompute a new ;; marker for them, so flush our cache. - (setq compilation-locs (make-hash-table :test 'equal :weakness 'value)) + (clrhash compilation-locs) (setq compilation-gcpro nil) ;; FIXME: the old code reset the directory-stack, so maybe we should ;; put a `directory change' marker of some sort, but where? -stef