From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: next-error-last-buffer Date: Sun, 09 May 2004 03:44:31 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <871xluig40.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084063749 20987 80.91.224.253 (9 May 2004 00:49:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 9 May 2004 00:49:09 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun May 09 02:49:02 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMcV4-0000st-00 for ; Sun, 09 May 2004 02:49:02 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMcV3-0001g9-00 for ; Sun, 09 May 2004 02:49:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMcUr-00050S-Fo for emacs-devel@quimby.gnus.org; Sat, 08 May 2004 20:48:49 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.33) id 1BMcTv-0003y4-8X for emacs-devel@gnu.org; Sat, 08 May 2004 20:47:51 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.33) id 1BMcT9-0002M6-AM for emacs-devel@gnu.org; Sat, 08 May 2004 20:47:37 -0400 Original-Received: from [66.33.219.4] (helo=spork.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMcT6-0002HK-Rm for emacs-devel@gnu.org; Sat, 08 May 2004 20:47:01 -0400 Original-Received: from mail.jurta.org (80-235-37-27-dsl.mus.estpak.ee [80.235.37.27]) by spork.dreamhost.com (Postfix) with ESMTP id F36D711DC0E for ; Sat, 8 May 2004 17:46:58 -0700 (PDT) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22957 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22957 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 compilation. 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) next-error-last-buffer) + (funcall next-error-function (prefix-numeric-value arg) reset) + (set (make-local-variable 'next-error-last-buffer) next-error-last-buffer)))) (defalias 'goto-next-locus 'next-error) (defalias 'next-match 'next-error) -- Juri Linkov http://www.jurta.org/emacs/