emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog progmodes/compile.el


From: Sam Steingold
Subject: [Emacs-diffs] emacs/lisp ChangeLog progmodes/compile.el
Date: Fri, 10 Jul 2009 18:23:54 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Sam Steingold <sds>     09/07/10 18:23:53

Modified files:
        lisp           : ChangeLog 
        lisp/progmodes : compile.el 

Log message:
        (compilation-mode-font-lock-keywords): Omake sometimes indents the
        errors it prints, so allow all regexps to start with spaces.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15794&r2=1.15795
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/compile.el?cvsroot=emacs&r1=1.494&r2=1.495

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15794
retrieving revision 1.15795
diff -u -b -r1.15794 -r1.15795
--- ChangeLog   10 Jul 2009 09:18:01 -0000      1.15794
+++ ChangeLog   10 Jul 2009 18:23:49 -0000      1.15795
@@ -1,3 +1,9 @@
+2009-07-10  Sam Steingold  <address@hidden>
+
+       * 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  <address@hidden>
 
        * cus-edit.el (customize-changed-options-previous-release): Bump

Index: progmodes/compile.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/compile.el,v
retrieving revision 1.494
retrieving revision 1.495
diff -u -b -r1.494 -r1.495
--- progmodes/compile.el        17 Jun 2009 16:33:45 -0000      1.494
+++ progmodes/compile.el        10 Jul 2009 18:23:52 -0000      1.495
@@ -975,7 +975,17 @@
              (line (nth 2 item))
              (col (nth 3 item))
              (type (nth 4 item))
+              (pat (car item))
              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 line)      (setq end-line (cdr line) line (car line)))
          (if (consp col)       (setq end-col (cdr col)   col (car col)))
@@ -984,7 +994,7 @@
              ;; The old compile.el had here an undocumented hook that
              ;; allowed `line' to be a function that computed the actual
              ;; error location.  Let's do our best.
-             `(,(car item)
+             `(,pat
                (0 (save-match-data
                     (compilation-compat-error-properties
                      (funcall ',line (cons (match-string ,file)
@@ -996,7 +1006,7 @@
            (unless (or (null (nth 5 item)) (integerp (nth 5 item)))
              (error "HYPERLINK should be an integer: %s" (nth 5 item)))
 
-           `(,(nth 0 item)
+           `(,pat
 
              ,@(when (integerp file)
                  `((,file ,(if (consp type)




reply via email to

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