mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 21:37:34 +00:00
(compilation-forget-errors): Just set
compilation-directory-stack to nil; no need to loop through it. (next-error): For a non-numeric prefix arg, pass nil for compile-reinitialize-errors's FIND-AT-LEAST arg. (next-error): When getting marker for error source location, be sure to examine buffer local value of compilation-old-error-list before switching to source file buffer.
This commit is contained in:
parent
b5ff800400
commit
bd3910fef2
1 changed files with 16 additions and 10 deletions
|
|
@ -632,7 +632,11 @@ See variables `compilation-parse-errors-function' and
|
|||
\`compilation-error-regexp-alist' for customization ideas."
|
||||
(interactive "P")
|
||||
(setq compilation-last-buffer (compilation-find-buffer))
|
||||
(compile-reinitialize-errors argp nil (1- (prefix-numeric-value argp)))
|
||||
(compile-reinitialize-errors argp nil
|
||||
;; We want to pass a number here only if
|
||||
;; we got a numeric prefix arg, not just C-u.
|
||||
(and (not (consp argp))
|
||||
(1- (prefix-numeric-value argp))))
|
||||
;; Make ARGP nil if the prefix arg was just C-u,
|
||||
;; since that means to reparse the errors, which the
|
||||
;; compile-reinitialize-errors call just did.
|
||||
|
|
@ -688,12 +692,15 @@ See variables `compilation-parse-errors-function' and
|
|||
;; Look for the next error.
|
||||
t)
|
||||
;; We found the file. Get a marker for this error.
|
||||
(set-buffer buffer)
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(widen)
|
||||
(let ((errors compilation-old-error-list)
|
||||
(last-line (cdr (cdr next-error))))
|
||||
;; compilation-old-error-list is a buffer-local
|
||||
;; variable, so we must be careful to extract its value
|
||||
;; before switching to the source file buffer.
|
||||
(let ((errors compilation-old-error-list)
|
||||
(last-line (cdr (cdr next-error))))
|
||||
(set-buffer buffer)
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(widen)
|
||||
(goto-line last-line)
|
||||
(beginning-of-line)
|
||||
(setcdr next-error (point-marker))
|
||||
|
|
@ -793,9 +800,8 @@ See variables `compilation-parse-errors-function' and
|
|||
(if (markerp (cdr next-error))
|
||||
(set-marker (cdr next-error) nil)))
|
||||
(setq compilation-old-error-list (cdr compilation-old-error-list)))
|
||||
(setq compilation-error-list nil)
|
||||
(while (cdr compilation-directory-stack)
|
||||
(setq compilation-directory-stack (cdr compilation-directory-stack))))
|
||||
(setq compilation-error-list nil
|
||||
compilation-directory-stack nil))
|
||||
|
||||
|
||||
(defun count-regexp-groupings (regexp)
|
||||
|
|
|
|||
Loading…
Reference in a new issue