# HG changeset patch # User Eli Zaretskii # Date 1062395144 0 # Node ID 1c091699d00e669764e2a41b829a6a8bf1c55ef7 # Parent 3978cfc630d9c66c56a9072d6bb2ede222498e79 (previous-error): Accept a prefix argument, similarly to next-error. diff -r 3978cfc630d9 -r 1c091699d00e lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Sun Aug 31 22:22:29 2003 +0000 +++ b/lisp/progmodes/compile.el Mon Sep 01 05:45:44 2003 +0000 @@ -1751,11 +1751,15 @@ (consp argp)))) ;;;###autoload (define-key ctl-x-map "`" 'next-error) -(defun previous-error () +(defun previous-error (argp) "Visit previous compilation error message and corresponding source code. -This operates on the output from the \\[compile] command." - (interactive) - (next-error -1)) + +A prefix ARGP specifies how many error messages to move; +negative means move forward to next error messages. + +This operates on the output from the \\[compile] and \\[grep] commands." + (interactive "P") + (next-error (- (prefix-numeric-value argp)))) (defun first-error () "Reparse the error message buffer and start at the first error.