emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r118122: * lisp/progmodes/compile.el (compilation--p


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r118122: * lisp/progmodes/compile.el (compilation--previous-directory): Simplify.
Date: Wed, 15 Oct 2014 15:26:31 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118122
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2014-10-15 11:25:47 -0400
message:
  * lisp/progmodes/compile.el (compilation--previous-directory): Simplify.
  (compilation-next-error): Ensure the parse before we look at
  compilation-message property.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/compile.el      compile.el-20091113204419-o5vbwnq5f7feedwu-126
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-10-15 14:11:25 +0000
+++ b/lisp/ChangeLog    2014-10-15 15:25:47 +0000
@@ -1,13 +1,17 @@
+2014-10-15  Stefan Monnier  <address@hidden>
+
+       * 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  <address@hidden>
 
-       * simple.el (what-cursor-position): Update to support the new bidi
-       characters.
-
+       * 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.
 

=== modified file 'lisp/progmodes/compile.el'
--- a/lisp/progmodes/compile.el 2014-08-13 19:17:21 +0000
+++ b/lisp/progmodes/compile.el 2014-10-15 15:25:47 +0000
@@ -969,19 +969,12 @@
                     (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 @@
   (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 @@
                                                    (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 @@
                                "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


reply via email to

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