comparison lisp/progmodes/compile.el @ 24264:ffc2b7069315

(compile-mouse-goto-error): Don't lose with null markers. (compile-goto-error): Likewise.
author Dave Love <fx@gnu.org>
date Fri, 05 Feb 1999 15:19:54 +0000
parents e6c0e87123a7
children c8a762e57cf6
comparison
equal deleted inserted replaced
24263:e81f007b15fa 24264:ffc2b7069315
1 ;;; compile.el --- run compiler as inferior of Emacs, parse error messages. 1 ;;; compile.el --- run compiler as inferior of Emacs, parse error messages.
2 2
3 ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. 3 ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
4 4
5 ;; Author: Roland McGrath <roland@prep.ai.mit.edu> 5 ;; Author: Roland McGrath <roland@prep.ai.mit.edu>
6 ;; Maintainer: FSF 6 ;; Maintainer: FSF
7 ;; Keywords: tools, processes 7 ;; Keywords: tools, processes
8 8
1293 1293
1294 ;; Move compilation-error-list to the elt of compilation-old-error-list 1294 ;; Move compilation-error-list to the elt of compilation-old-error-list
1295 ;; we want. 1295 ;; we want.
1296 (setq compilation-error-list compilation-old-error-list) 1296 (setq compilation-error-list compilation-old-error-list)
1297 (while (and compilation-error-list 1297 (while (and compilation-error-list
1298 (> (point) (car (car compilation-error-list)))) 1298 ;; The marker can point nowhere if we previously
1299 ;; failed to find the relevant file. See
1300 ;; compilation-next-error-locus.
1301 (or (null (marker-buffer (caar compilation-error-list)))
1302 (> (point) (caar compilation-error-list))))
1299 (setq compilation-error-list (cdr compilation-error-list))) 1303 (setq compilation-error-list (cdr compilation-error-list)))
1300 (or compilation-error-list 1304 (or compilation-error-list
1301 (error "No error to go to"))) 1305 (error "No error to go to")))
1302 (select-window (posn-window (event-end event))) 1306 (select-window (posn-window (event-end event)))
1303 1307
1320 1324
1321 ;; Move compilation-error-list to the elt of compilation-old-error-list 1325 ;; Move compilation-error-list to the elt of compilation-old-error-list
1322 ;; we want. 1326 ;; we want.
1323 (setq compilation-error-list compilation-old-error-list) 1327 (setq compilation-error-list compilation-old-error-list)
1324 (while (and compilation-error-list 1328 (while (and compilation-error-list
1325 (> (point) (car (car compilation-error-list)))) 1329 ;; The marker can point nowhere if we previously
1330 ;; failed to find the relevant file. See
1331 ;; compilation-next-error-locus.
1332 (or (null (marker-buffer (caar compilation-error-list)))
1333 (> (point) (caar compilation-error-list))))
1326 (setq compilation-error-list (cdr compilation-error-list))) 1334 (setq compilation-error-list (cdr compilation-error-list)))
1327 1335
1328 (push-mark) 1336 (push-mark)
1329 (next-error 1)) 1337 (next-error 1))
1330 1338