emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108127: Extract "^[wW]arning" int


From: Leo Liu
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108127: Extract "^[wW]arning" into a new var flymake-warning-re
Date: Thu, 30 Aug 2012 19:41:40 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108127
committer: Leo Liu <address@hidden>
branch nick: emacs-24
timestamp: Thu 2012-08-30 19:41:40 +0800
message:
  Extract "^[wW]arning" into a new var flymake-warning-re
modified:
  lisp/ChangeLog
  lisp/progmodes/flymake.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-08-30 01:18:41 +0000
+++ b/lisp/ChangeLog    2012-08-30 11:41:40 +0000
@@ -1,3 +1,8 @@
+2012-08-30  Leo Liu  <address@hidden>
+
+       * progmodes/flymake.el (flymake-warning-re): New variable.
+       (flymake-parse-line): Use it.
+
 2012-08-30  Glenn Morris  <address@hidden>
 
        * calendar/holidays.el (holiday-christian-holidays):

=== modified file 'lisp/progmodes/flymake.el'
--- a/lisp/progmodes/flymake.el 2012-02-08 02:12:24 +0000
+++ b/lisp/progmodes/flymake.el 2012-08-30 11:41:40 +0000
@@ -947,6 +947,9 @@
 ;;   :type '(repeat (string number number number))
 ;;)
 
+(defvar flymake-warning-re "^[wW]arning"
+  "Regexp matching against err-text to detect a warning.")
+
 (defun flymake-parse-line (line)
   "Parse LINE to see if it is an error or warning.
 Return its components if so, nil otherwise."
@@ -967,7 +970,7 @@
                                  (match-string (nth 4 (car patterns)) line)
                                (flymake-patch-err-text (substring line 
(match-end 0)))))
          (or err-text (setq err-text "<no error text>"))
-         (if (and err-text (string-match "^[wW]arning" err-text))
+         (if (and err-text (string-match flymake-warning-re err-text))
              (setq err-type "w")
            )
          (flymake-log 3 "parse line: file-idx=%s line-idx=%s file=%s line=%s 
text=%s" file-idx line-idx


reply via email to

[Prev in Thread] Current Thread [Next in Thread]