From ee31aabc4ee4086d5c78dbc93dfbab07b9ecc2a7 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 20 Aug 2011 22:07:00 -0400 Subject: [PATCH] Fix error in compilation-error-properties. * lisp/progmodes/compile.el (compilation-error-properties): Fix confusion between file struct and message struct (Bug#9319). --- lisp/ChangeLog | 3 +++ lisp/progmodes/compile.el | 13 ++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) 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 -- 2.39.2