]> code.delx.au - gnu-emacs/commitdiff
* lisp/progmodes/compile.el (compilation--previous-directory): Simplify.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 15 Oct 2014 15:25:47 +0000 (11:25 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 15 Oct 2014 15:25:47 +0000 (11:25 -0400)
(compilation-next-error): Ensure the parse before we look at
compilation-message property.

lisp/ChangeLog
lisp/progmodes/compile.el

index f2e2d8b96f26d1fbfe63748c4a9325be6545460b..9b6d532decb35ceb0ef00746658dfd7aa0e5812a 100644 (file)
@@ -1,13 +1,17 @@
-2014-10-15  Eli Zaretskii  <eliz@gnu.org>
+2014-10-15  Stefan Monnier  <monnier@iro.umontreal.ca>
 
-       * simple.el (what-cursor-position): Update to support the new bidi
-       characters.
+       * progmodes/compile.el (compilation--previous-directory): Simplify.
+       (compilation-next-error): Ensure the parse before we look at
+       compilation-message property.
+
+2014-10-15  Eli Zaretskii  <eliz@gnu.org>
 
+       * simple.el (what-cursor-position):
        * descr-text.el (describe-char): Update to support the new bidi
        characters.
 
-       * emacs-lisp/tabulated-list.el (tabulated-list-mode): Force
-       bidi-paragraph-direction to 'left-to-right'.  This fixes
+       * emacs-lisp/tabulated-list.el (tabulated-list-mode):
+       Force bidi-paragraph-direction to 'left-to-right'.  This fixes
        buffer-menu display when the first buffer happens to start with
        R2L letter.
 
index 5d3b6878a70601c5c9f5bca1f7f42473e92feddb..ee066f4c56cf2ac219b49bd04d371a06b3e232b1 100644 (file)
@@ -969,19 +969,12 @@ POS and RES.")
                     (cons (copy-marker pos) (if prev (copy-marker prev))))
               prev)
              ((and prev (= prev cache))
-              (if cache
-                  (set-marker (car compilation--previous-directory-cache) pos)
-                (setq compilation--previous-directory-cache
-                      (cons (copy-marker pos) nil)))
+              (set-marker (car compilation--previous-directory-cache) pos)
               (cdr compilation--previous-directory-cache))
              (t
-              (if cache
-                  (progn
-                    (set-marker cache pos)
-                    (setcdr compilation--previous-directory-cache
-                            (copy-marker prev)))
-                (setq compilation--previous-directory-cache
-                      (cons (copy-marker pos) (if prev (copy-marker prev)))))
+              (set-marker cache pos)
+              (setcdr compilation--previous-directory-cache
+                      (copy-marker prev))
               prev))))
       (if (markerp res) (marker-position res) res))))
 
@@ -2286,6 +2279,7 @@ looking for the next message."
   (or (compilation-buffer-p (current-buffer))
       (error "Not in a compilation buffer"))
   (or pt (setq pt (point)))
+  (compilation--ensure-parse pt)
   (let* ((msg (get-text-property pt 'compilation-message))
          ;; `loc', `msg', and `last' are used by the compilation-loop macro.
         (loc (and msg (compilation--message->loc msg)))
@@ -2298,7 +2292,8 @@ looking for the next message."
                                                    (line-beginning-position)))
          (unless (setq msg (get-text-property (max (1- pt) (point-min))
                                                'compilation-message))
-           (setq pt (next-single-property-change pt 'compilation-message nil
+           (setq pt (compilation-next-single-property-change
+                      pt 'compilation-message nil
                                                  (line-end-position)))
            (or (setq msg (get-text-property pt 'compilation-message))
                (setq pt (point)))))
@@ -2309,7 +2304,6 @@ looking for the next message."
                                "No more %ss yet"
                              "Moved past last %s")
                            (point-max))
-        (compilation--ensure-parse pt)
        ;; Don't move "back" to message at or before point.
        ;; Pass an explicit (point-min) to make sure pt is non-nil.
        (setq pt (previous-single-property-change