From: Stefan Monnier Date: Wed, 15 Oct 2014 15:25:47 +0000 (-0400) Subject: * lisp/progmodes/compile.el (compilation--previous-directory): Simplify. X-Git-Tag: emacs-25.0.90~2635^2~679^2~49 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d7b601108d48e2508ce1bcbd5bacb2d8e0bd0f78;p=emacs.git * lisp/progmodes/compile.el (compilation--previous-directory): Simplify. (compilation-next-error): Ensure the parse before we look at compilation-message property. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f2e2d8b96f2..9b6d532decb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,13 +1,17 @@ -2014-10-15 Eli Zaretskii +2014-10-15 Stefan Monnier - * 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 + * 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. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 5d3b6878a70..ee066f4c56c 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -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