[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
next-error accepts a prefix argument, but previous-error doesn't
From: |
Kevin Rodgers |
Subject: |
next-error accepts a prefix argument, but previous-error doesn't |
Date: |
Tue, 19 Aug 2003 11:31:01 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
Here's a patch to allow the user to specify how many errors to move:
*** emacs-21.3/lisp/progmodes/compile.el.orig Fri Jan 17 06:45:11 2003
--- emacs-21.3/lisp/progmodes/compile.el Tue Aug 19 11:26:38 2003
***************
*** 1478,1489 ****
(consp argp))))
;;;###autoload (define-key ctl-x-map "`" 'next-error)
! (defun previous-error ()
"Visit previous compilation error message and corresponding source code.
- This operates on the output from the \\[compile] command."
- (interactive)
- (next-error -1))
(defun first-error ()
"Reparse the error message buffer and start at the first error.
Visit corresponding source code.
--- 1478,1493 ----
(consp argp))))
;;;###autoload (define-key ctl-x-map "`" 'next-error)
! (defun previous-error (argp)
"Visit previous compilation error message and corresponding source code.
+ 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.
Visit corresponding source code.
--
Kevin Rodgers
- next-error accepts a prefix argument, but previous-error doesn't,
Kevin Rodgers <=