changeset 8342:95c011057e51

(compilation-next-error-locus): New arg SILENT.
author Richard M. Stallman <rms@gnu.org>
date Tue, 26 Jul 1994 19:18:06 +0000
parents 7198dbca1d01
children 0862dff6dfba
files lisp/progmodes/compile.el
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Tue Jul 26 15:51:56 1994 +0000
+++ b/lisp/progmodes/compile.el	Tue Jul 26 19:18:06 1994 +0000
@@ -819,7 +819,7 @@
 			   (consp argp))))
 ;;;###autoload (define-key ctl-x-map "`" 'next-error)
 
-(defun compilation-next-error-locus (&optional move reparse)
+(defun compilation-next-error-locus (&optional move reparse silent)
   "Visit next compilation error and return locus in corresponding source code.
 This operates on the output from the \\[compile] command.
 If all preparsed error messages have been processed,
@@ -832,7 +832,8 @@
 Optional first arg MOVE says how many error messages to move forwards (or
 backwards, if negative); default is 1.  Optional second arg REPARSE, if
 non-nil, says to reparse the error message buffer and reset to the first
-error (plus MOVE - 1).
+error (plus MOVE - 1).  If optional third argument SILENT is non-nil, return 
+nil instead of raising an error if there are no more errors.
 
 The current buffer should be the desired compilation output buffer."
   (or move (setq move 1))
@@ -878,7 +879,7 @@
 					 (get-buffer-process
 					  (current-buffer)))
 					'run)
-				    " yet"))))
+					" yet")))))
 	    (setq compilation-error-list (cdr next-errors))
 	    (if (null (cdr next-error))
 		;; This error is boring.  Go to the next.
@@ -951,7 +952,7 @@
 	      (or (not (markerp (cdr next-error)))
 		  (not (marker-buffer (cdr next-error))))))
 	(setq next-errors compilation-error-list
-	      next-error (car next-errors))))
+		next-error (car next-errors)))))
 
     ;; Skip over multiple error messages for the same source location,
     ;; so the next C-x ` won't go to an error in the same place.