From: Chong Yidong Date: Sun, 21 Aug 2011 02:07:00 +0000 (-0400) Subject: Fix error in compilation-error-properties. X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~70^2~15^2~27 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ee31aabc4ee4086d5c78dbc93dfbab07b9ecc2a7;p=emacs.git Fix error in compilation-error-properties. * lisp/progmodes/compile.el (compilation-error-properties): Fix confusion between file struct and message struct (Bug#9319). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 06dd2bf1198..53fbdf00087 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-08-21 Chong Yidong + * progmodes/compile.el (compilation-error-properties): Fix + confusion between file struct and message struct (Bug#9319). + * net/browse-url.el (browse-url-firefox): Don't call browse-url-firefox-sentinel unless using -remote (Bug#9328). diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f3b873c8b1e..33bd9ff96a7 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -985,12 +985,15 @@ POS and RES.") (let* ((prev (or (get-text-property (1- prev-pos) 'compilation-message) (get-text-property prev-pos 'compilation-message))) - (prev-struct - (car (nth 2 (car prev))))) + (prev-file-struct + (and prev + (compilation--loc->file-struct + (compilation--message->loc prev))))) + ;; Construct FILE . DIR from that. - (if prev-struct - (setq file (cons (car prev-struct) - (cadr prev-struct)))))) + (if prev-file-struct + (setq file (cons (caar prev-file-struct) + (cadr (car prev-file-struct))))))) (unless file (setq file '("*unknown*"))))) ;; All of these fields are optional, get them only if we have an index, and