aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/compile.el26
1 files changed, 16 insertions, 10 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 3c47657c918..999427e2610 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -632,7 +632,11 @@ See variables `compilation-parse-errors-function' and
632\`compilation-error-regexp-alist' for customization ideas." 632\`compilation-error-regexp-alist' for customization ideas."
633 (interactive "P") 633 (interactive "P")
634 (setq compilation-last-buffer (compilation-find-buffer)) 634 (setq compilation-last-buffer (compilation-find-buffer))
635 (compile-reinitialize-errors argp nil (1- (prefix-numeric-value argp))) 635 (compile-reinitialize-errors argp nil
636 ;; We want to pass a number here only if
637 ;; we got a numeric prefix arg, not just C-u.
638 (and (not (consp argp))
639 (1- (prefix-numeric-value argp))))
636 ;; Make ARGP nil if the prefix arg was just C-u, 640 ;; Make ARGP nil if the prefix arg was just C-u,
637 ;; since that means to reparse the errors, which the 641 ;; since that means to reparse the errors, which the
638 ;; compile-reinitialize-errors call just did. 642 ;; compile-reinitialize-errors call just did.
@@ -688,12 +692,15 @@ See variables `compilation-parse-errors-function' and
688 ;; Look for the next error. 692 ;; Look for the next error.
689 t) 693 t)
690 ;; We found the file. Get a marker for this error. 694 ;; We found the file. Get a marker for this error.
691 (set-buffer buffer) 695 ;; compilation-old-error-list is a buffer-local
692 (save-excursion 696 ;; variable, so we must be careful to extract its value
693 (save-restriction 697 ;; before switching to the source file buffer.
694 (widen) 698 (let ((errors compilation-old-error-list)
695 (let ((errors compilation-old-error-list) 699 (last-line (cdr (cdr next-error))))
696 (last-line (cdr (cdr next-error)))) 700 (set-buffer buffer)
701 (save-excursion
702 (save-restriction
703 (widen)
697 (goto-line last-line) 704 (goto-line last-line)
698 (beginning-of-line) 705 (beginning-of-line)
699 (setcdr next-error (point-marker)) 706 (setcdr next-error (point-marker))
@@ -793,9 +800,8 @@ See variables `compilation-parse-errors-function' and
793 (if (markerp (cdr next-error)) 800 (if (markerp (cdr next-error))
794 (set-marker (cdr next-error) nil))) 801 (set-marker (cdr next-error) nil)))
795 (setq compilation-old-error-list (cdr compilation-old-error-list))) 802 (setq compilation-old-error-list (cdr compilation-old-error-list)))
796 (setq compilation-error-list nil) 803 (setq compilation-error-list nil
797 (while (cdr compilation-directory-stack) 804 compilation-directory-stack nil))
798 (setq compilation-directory-stack (cdr compilation-directory-stack))))
799 805
800 806
801(defun count-regexp-groupings (regexp) 807(defun count-regexp-groupings (regexp)