# HG changeset patch # User Dave Love # Date 918227994 0 # Node ID ffc2b7069315aa9b987d47b0dad5468401f80ca6 # Parent e81f007b15fa1bdadad98fdfd5792424ae299877 (compile-mouse-goto-error): Don't lose with null markers. (compile-goto-error): Likewise. diff -r e81f007b15fa -r ffc2b7069315 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Fri Feb 05 05:40:27 1999 +0000 +++ b/lisp/progmodes/compile.el Fri Feb 05 15:19:54 1999 +0000 @@ -1,6 +1,6 @@ ;;; compile.el --- run compiler as inferior of Emacs, parse error messages. -;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. +;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. ;; Author: Roland McGrath ;; Maintainer: FSF @@ -1295,7 +1295,11 @@ ;; we want. (setq compilation-error-list compilation-old-error-list) (while (and compilation-error-list - (> (point) (car (car compilation-error-list)))) + ;; The marker can point nowhere if we previously + ;; failed to find the relevant file. See + ;; compilation-next-error-locus. + (or (null (marker-buffer (caar compilation-error-list))) + (> (point) (caar compilation-error-list)))) (setq compilation-error-list (cdr compilation-error-list))) (or compilation-error-list (error "No error to go to"))) @@ -1322,7 +1326,11 @@ ;; we want. (setq compilation-error-list compilation-old-error-list) (while (and compilation-error-list - (> (point) (car (car compilation-error-list)))) + ;; The marker can point nowhere if we previously + ;; failed to find the relevant file. See + ;; compilation-next-error-locus. + (or (null (marker-buffer (caar compilation-error-list))) + (> (point) (caar compilation-error-list)))) (setq compilation-error-list (cdr compilation-error-list))) (push-mark)