changeset 52394:1c091699d00e

(previous-error): Accept a prefix argument, similarly to next-error.
author Eli Zaretskii <eliz@gnu.org>
date Mon, 01 Sep 2003 05:45:44 +0000
parents 3978cfc630d9
children 7a69310b90d0
files lisp/progmodes/compile.el
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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.