summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2003-09-01 05:47:12 +0000
committerEli Zaretskii <eliz@gnu.org>2003-09-01 05:47:12 +0000
commit00c8f41844afc3149536a134479870c3442e9070 (patch)
tree666173c88b2723d394156fbd324ba1ef86328724 /lisp
parente9eee23e17d22e1def722b9c5f2779ac44db6ed9 (diff)
downloademacs-00c8f41844afc3149536a134479870c3442e9070.tar.gz
(previous-error): Accept a prefix argument, similarly to next-error.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/compile.el12
2 files changed, 13 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7dbe7425530..9fff40276d3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-01 Kevin Rodgers <ihs_4664@yahoo.com> (tiny change)
+
+ * progmodes/compile.el (previous-error): Accept a prefix
+ argument, similarly to next-error.
+
2003-08-31 Masatake YAMATO <jet@gyve.org>
* pcvs.el (cvs-do-removal): Use = instead of eq to check
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 3effe71d30b..f2bffa1a089 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1751,11 +1751,15 @@ See variables `compilation-parse-errors-function' and
(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.