diff options
author | Dave Love <[email protected]> | 1999-02-05 15:19:54 +0000 |
---|---|---|
committer | Dave Love <[email protected]> | 1999-02-05 15:19:54 +0000 |
commit | 41a3354e11e2a16599c192c3e26f12a8ffa1b9bc (patch) | |
tree | 475029cecd8f47190d138cf18cef59c4c9c7ece5 /lisp/progmodes/compile.el | |
parent | f3ac545f7d2d71eaa31f1a56f729a428f94e71d2 (diff) |
(compile-mouse-goto-error): Don't lose with
null markers.
(compile-goto-error): Likewise.
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r-- | lisp/progmodes/compile.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 87f8cfc5d1..138660d350 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 <[email protected]> ;; 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) |