[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Juri Linkov
Subject: next-error-last-buffer
Date: Sun, 09 May 2004 03:44:31 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

The current treatment of the `next-error-last-buffer' variable
is very inconvenient, because it is not possible to continue
visiting source files from a compilation other than the latest

I think that `next-error-last-buffer' should be set buffer-locally
in the compilation buffer as well as in every source file visited
from that compilation buffer.  Thus calling `next-error' on a
visited buffer or a compilation buffer will continue visiting
locations for the same compilation from which a visited buffer
was found or a compilation buffer was created.

Index: lisp/simple.el
RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v
retrieving revision 1.642
diff -u -r1.642 simple.el
--- lisp/simple.el      7 May 2004 22:31:54 -0000       1.642
+++ lisp/simple.el      9 May 2004 00:38:21 -0000
@@ -152,10 +152,12 @@
 \`compilation-error-regexp-alist' for customization ideas."
   (interactive "P")
   (if (consp arg) (setq reset t arg nil))
-  (when (setq next-error-last-buffer (next-error-find-buffer))
+  (when (setq-default next-error-last-buffer (next-error-find-buffer))
     ;; we know here that next-error-function is a valid symbol we can funcall
     (with-current-buffer next-error-last-buffer
-      (funcall next-error-function (prefix-numeric-value arg) reset))))
+      (set (make-local-variable 'next-error-last-buffer) 
+      (funcall next-error-function (prefix-numeric-value arg) reset)
+      (set (make-local-variable 'next-error-last-buffer) 
 (defalias 'goto-next-locus 'next-error)
 (defalias 'next-match 'next-error)

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]