From 41a3354e11e2a16599c192c3e26f12a8ffa1b9bc Mon Sep 17 00:00:00 2001 From: Dave Love Date: Fri, 5 Feb 1999 15:19:54 +0000 Subject: [PATCH] (compile-mouse-goto-error): Don't lose with null markers. (compile-goto-error): Likewise. --- lisp/progmodes/compile.el | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 87f8cfc5d11..138660d3502 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -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 @@ at the end of the line." ;; 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 @@ other kinds of prefix arguments are ignored." ;; 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) -- 2.39.2