comparison lisp/progmodes/compile.el @ 6197:8ddddba0de43

(compile-goto-error): Push the mark before calling next-error.
author Roland McGrath <roland@gnu.org>
date Fri, 04 Mar 1994 06:11:51 +0000
parents bd2a637f1b30
children 5ce2192f76e1
comparison
equal deleted inserted replaced
6196:390dfe557c7d 6197:8ddddba0de43
677 (setq compilation-error-list error-list-pos)) 677 (setq compilation-error-list error-list-pos))
678 ))))) 678 )))))
679 679
680 (defun compile-goto-error (&optional argp) 680 (defun compile-goto-error (&optional argp)
681 "Visit the source for the error message point is on. 681 "Visit the source for the error message point is on.
682 Use this command in a compilation log buffer. 682 Use this command in a compilation log buffer. Sets the mark at point there.
683 \\[universal-argument] as a prefix arg means to reparse the buffer's error messages first; 683 \\[universal-argument] as a prefix arg means to reparse the buffer's error messages first;
684 other kinds of prefix arguments are ignored." 684 other kinds of prefix arguments are ignored."
685 (interactive "P") 685 (interactive "P")
686 (or (compilation-buffer-p (current-buffer)) 686 (or (compilation-buffer-p (current-buffer))
687 (error "Not in a compilation buffer.")) 687 (error "Not in a compilation buffer."))
705 (other-window -1) 705 (other-window -1)
706 ;; other-window changed the selected buffer, 706 ;; other-window changed the selected buffer,
707 ;; but we didn't want to do that. 707 ;; but we didn't want to do that.
708 (set-buffer compilation-last-buffer))) 708 (set-buffer compilation-last-buffer)))
709 709
710 (push-mark)
710 (next-error 1)) 711 (next-error 1))
711 712
712 ;; Return a compilation buffer. 713 ;; Return a compilation buffer.
713 ;; If the current buffer is a compilation buffer, return it. 714 ;; If the current buffer is a compilation buffer, return it.
714 ;; If compilation-last-buffer is set to a live buffer, use that. 715 ;; If compilation-last-buffer is set to a live buffer, use that.