Mercurial > hg > xemacs-beta
comparison lisp/next-error.el @ 3299:b593e47979a5
[xemacs-hg @ 2006-03-25 11:20:50 by malcolmp]
Rename functions that clash with the next-error family in compile.el.
author | malcolmp |
---|---|
date | Sat, 25 Mar 2006 11:20:51 +0000 |
parents | 1e7cc382eb16 |
children | 308d34e9f07d |
comparison
equal
deleted
inserted
replaced
3298:4f60b18bdee8 | 3299:b593e47979a5 |
---|---|
22 ;; along with XEmacs; see the file COPYING. If not, write to the | 22 ;; along with XEmacs; see the file COPYING. If not, write to the |
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | 24 ;; Boston, MA 02110-1301, USA. |
25 | 25 |
26 ;;; Synched up with: FSF 22.0.50.1 (CVS) | 26 ;;; Synched up with: FSF 22.0.50.1 (CVS) |
27 ;;; Some functions renamed with the next-error-framework prefix to avoid | |
28 ;;; clashes with the next-error code in compile.el. One day compile.el | |
29 ;;; will use this framework. | |
27 | 30 |
28 (defgroup next-error nil | 31 (defgroup next-error nil |
29 "`next-error' support framework." | 32 "`next-error' support framework." |
30 :group 'compilation | 33 :group 'compilation |
31 :version "22.1") | 34 :version "22.1") |
173 (current-buffer))) | 176 (current-buffer))) |
174 ;; 6. Give up. | 177 ;; 6. Give up. |
175 (error "No next-error capable buffer found"))) | 178 (error "No next-error capable buffer found"))) |
176 | 179 |
177 ;;;###autoload | 180 ;;;###autoload |
178 (defun next-error (&optional arg reset) | 181 (defun next-error-framework-next-error (&optional arg reset) |
179 "Visit next `next-error' message and corresponding source code. | 182 "Visit next `next-error-framework-next-error' message and corresponding source code. |
180 | 183 |
181 If all the error messages parsed so far have been processed already, | 184 If all the error messages parsed so far have been processed already, |
182 the message buffer is checked for new ones. | 185 the message buffer is checked for new ones. |
183 | 186 |
184 A prefix ARG specifies how many error messages to move; | 187 A prefix ARG specifies how many error messages to move; |
186 Just \\[universal-argument] as a prefix means reparse the error message buffer | 189 Just \\[universal-argument] as a prefix means reparse the error message buffer |
187 and start at the first error. | 190 and start at the first error. |
188 | 191 |
189 The RESET argument specifies that we should restart from the beginning. | 192 The RESET argument specifies that we should restart from the beginning. |
190 | 193 |
191 \\[next-error] normally uses the most recently started | 194 \\[next-error-framework-next-error] normally uses the most recently started |
192 compilation, grep, or occur buffer. It can also operate on any | 195 compilation, grep, or occur buffer. It can also operate on any |
193 buffer with output from the \\[compile], \\[grep] commands, or, | 196 buffer with output from the \\[compile], \\[grep] commands, or, |
194 more generally, on any buffer in Compilation mode or with | 197 more generally, on any buffer in Compilation mode or with |
195 Compilation Minor mode enabled, or any buffer in which | 198 Compilation Minor mode enabled, or any buffer in which |
196 `next-error-function' is bound to an appropriate function. | 199 `next-error-function' is bound to an appropriate function. |
197 To specify use of a particular buffer for error messages, type | 200 To specify use of a particular buffer for error messages, type |
198 \\[next-error] in that buffer when it is the only one displayed | 201 \\[next-error-framework-next-error] in that buffer when it is the only one displayed |
199 in the current frame. | 202 in the current frame. |
200 | 203 |
201 Once \\[next-error] has chosen the buffer for error messages, it | 204 Once \\[next-error-framework-next-error] has chosen the buffer for error messages, it |
202 runs `next-error-hook' with `run-hooks', and stays with that buffer | 205 runs `next-error-hook' with `run-hooks', and stays with that buffer |
203 until you use it in some other buffer which uses Compilation mode | 206 until you use it in some other buffer which uses Compilation mode |
204 or Compilation Minor mode. | 207 or Compilation Minor mode. |
205 | 208 |
206 See variables `compilation-parse-errors-function' and | 209 See variables `compilation-parse-errors-function' and |
211 ;; we know here that next-error-function is a valid symbol we can funcall | 214 ;; we know here that next-error-function is a valid symbol we can funcall |
212 (with-current-buffer next-error-last-buffer | 215 (with-current-buffer next-error-last-buffer |
213 (funcall next-error-function (prefix-numeric-value arg) reset) | 216 (funcall next-error-function (prefix-numeric-value arg) reset) |
214 (run-hooks 'next-error-hook)))) | 217 (run-hooks 'next-error-hook)))) |
215 | 218 |
216 (defalias 'goto-next-locus 'next-error) | 219 (defalias 'goto-next-locus 'next-error-framework-next-error) |
217 (defalias 'next-match 'next-error) | 220 (defalias 'next-match 'next-error-framework-next-error) |
218 | 221 |
219 (defun previous-error (&optional n) | 222 (defun next-error-framework-previous-error (&optional n) |
220 "Visit previous `next-error' message and corresponding source code. | 223 "Visit previous `next-error-framework-next-error' message and corresponding source code. |
221 | 224 |
222 Prefix arg N says how many error messages to move backwards (or | 225 Prefix arg N says how many error messages to move backwards (or |
223 forwards, if negative). | 226 forwards, if negative). |
224 | 227 |
225 This operates on the output from the \\[compile] and \\[grep] commands." | 228 This operates on the output from the \\[compile] and \\[grep] commands." |
226 (interactive "p") | 229 (interactive "p") |
227 (next-error (- (or n 1)))) | 230 (next-error-framework-next-error (- (or n 1)))) |
228 | 231 |
229 (defun first-error (&optional n) | 232 (defun next-error-framework-first-error (&optional n) |
230 "Restart at the first error. | 233 "Restart at the first error. |
231 Visit corresponding source code. | 234 Visit corresponding source code. |
232 With prefix arg N, visit the source code of the Nth error. | 235 With prefix arg N, visit the source code of the Nth error. |
233 This operates on the output from the \\[compile] command, for instance." | 236 This operates on the output from the \\[compile] command, for instance." |
234 (interactive "p") | 237 (interactive "p") |
235 (next-error n t)) | 238 (next-error-framework-next-error n t)) |
236 | 239 |
237 (defun next-error-no-select (&optional n) | 240 (defun next-error-no-select (&optional n) |
238 "Move point to the next error in the `next-error' buffer and highlight match. | 241 "Move point to the next error in the `next-error' buffer and highlight match. |
239 Prefix arg N says how many error messages to move forwards (or | 242 Prefix arg N says how many error messages to move forwards (or |
240 backwards, if negative). | 243 backwards, if negative). |
241 Finds and highlights the source line like \\[next-error], but does not | 244 Finds and highlights the source line like \\[next-error], but does not |
242 select the source buffer." | 245 select the source buffer." |
243 (interactive "p") | 246 (interactive "p") |
244 (let ((next-error-highlight next-error-highlight-no-select)) | 247 (let ((next-error-highlight next-error-highlight-no-select)) |
245 (next-error n)) | 248 (next-error-framework-next-error n)) |
246 (pop-to-buffer next-error-last-buffer)) | 249 (pop-to-buffer next-error-last-buffer)) |
247 | 250 |
248 (defun previous-error-no-select (&optional n) | 251 (defun previous-error-no-select (&optional n) |
249 "Move point to the previous error in the `next-error' buffer and highlight match. | 252 "Move point to the previous error in the `next-error' buffer and highlight match. |
250 Prefix arg N says how many error messages to move backwards (or | 253 Prefix arg N says how many error messages to move backwards (or |