]> git.eshelyaron.com Git - emacs.git/commitdiff
Parse the whole buffer at once in compile.el
authorJonas Bernoulli <jonas@bernoul.li>
Fri, 14 Aug 2020 14:18:01 +0000 (16:18 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 14 Aug 2020 14:23:16 +0000 (16:23 +0200)
* lisp/progmodes/compile.el (compilation-next-single-property-change):
Parse whole buffer at once (bug#42806).

Also remove the comment that mentioned that it is an option to do it
in one go as we now actually start doing.  As the existence of that
comment suggested, there is not really a reason to process the buffer
in small chunks.  On the contrary, processing the output in arbitrary
units can result in certain constructs not being recognized because
they begin in one arbitrary chunk, while ending in another.

lisp/progmodes/compile.el

index 3106c61585ec4e110b35a98dc2f58b4fd1862d97..a043bbcfa3c12fa81a7c2b9911093d52ff8df1e5 100644 (file)
@@ -2417,12 +2417,9 @@ and runs `compilation-filter-hook'."
                                                 &optional object limit)
   (let (parsed res)
     (while (progn
-             ;; We parse the buffer here "on-demand" by chunks of 500 chars.
-             ;; But we could also just parse the whole buffer.
              (compilation--ensure-parse
               (setq parsed (max compilation--parsed
-                                (min (+ position 500)
-                                     (or limit (point-max))))))
+                                (or limit (point-max)))))
              (and (or (not (setq res (next-single-property-change
                                       position prop object limit)))
                       (eq res limit))