aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/compile.el13
1 files changed, 8 insertions, 5 deletions
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.")
985 (let* ((prev 985 (let* ((prev
986 (or (get-text-property (1- prev-pos) 'compilation-message) 986 (or (get-text-property (1- prev-pos) 'compilation-message)
987 (get-text-property prev-pos 'compilation-message))) 987 (get-text-property prev-pos 'compilation-message)))
988 (prev-struct 988 (prev-file-struct
989 (car (nth 2 (car prev))))) 989 (and prev
990 (compilation--loc->file-struct
991 (compilation--message->loc prev)))))
992
990 ;; Construct FILE . DIR from that. 993 ;; Construct FILE . DIR from that.
991 (if prev-struct 994 (if prev-file-struct
992 (setq file (cons (car prev-struct) 995 (setq file (cons (caar prev-file-struct)
993 (cadr prev-struct)))))) 996 (cadr (car prev-file-struct)))))))
994 (unless file 997 (unless file
995 (setq file '("*unknown*"))))) 998 (setq file '("*unknown*")))))
996 ;; All of these fields are optional, get them only if we have an index, and 999 ;; All of these fields are optional, get them only if we have an index, and