From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Add M-x occur to the menu-bar Date: Fri, 13 Feb 2004 21:58:35 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <4nisixjibl.fsf@collins.bwh.harvard.edu> <20040127230323.GB5407@fencepost> <4n7jzc919v.fsf@collins.bwh.harvard.edu> <4nn085i7nl.fsf@collins.bwh.harvard.edu> <4noese37h0.fsf@collins.bwh.harvard.edu> <4nbrodxwqm.fsf@collins.bwh.harvard.edu> <4n8yjcccvj.fsf@collins.bwh.harvard.edu> <4nwu6sp7ni.fsf@collins.bwh.harvard.edu> <4nr7x0ox3l.fsf@collins.bwh.harvard.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1076706251 31383 80.91.224.253 (13 Feb 2004 21:04:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Feb 2004 21:04:11 +0000 (UTC) Cc: Ted Zlatanov , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Feb 13 22:03:51 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 1ArkTW-000104-00 for ; Fri, 13 Feb 2004 22:03:50 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ArkTW-00059B-00 for ; Fri, 13 Feb 2004 22:03:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ArkRC-0004ov-Nt for emacs-devel@quimby.gnus.org; Fri, 13 Feb 2004 16:01:26 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ArkQB-0004f5-SB for emacs-devel@gnu.org; Fri, 13 Feb 2004 16:00:23 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ArkPd-0004Z3-U8 for emacs-devel@gnu.org; Fri, 13 Feb 2004 16:00:21 -0500 Original-Received: from [195.135.220.2] (helo=Cantor.suse.de) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ArkPd-0004YL-9K for emacs-devel@gnu.org; Fri, 13 Feb 2004 15:59:49 -0500 Original-Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id 161891CCB9D; Fri, 13 Feb 2004 21:58:36 +0100 (CET) Original-Received: by sykes.suse.de (Postfix, from userid 597) id 2A540755C; Fri, 13 Feb 2004 21:58:35 +0100 (CET) Original-To: Stefan Monnier X-Yow: I'm in direct contact with many advanced fun CONCEPTS. In-Reply-To: (Stefan Monnier's message of "12 Feb 2004 15:57:25 -0500") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 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:19927 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19927 Stefan Monnier writes: > One of the classic pitfalls of make-variable-buffer-local which your code > suffers from is the following: > Say I change diff-mode to do > > (setq compilation-next-error-function 'diff-foo) > > just like I intend to. Now the behavior will be either to set the local or > the global vriable depending on whether or not compile.el has already > been loaded. And no: requiring compile.el is not an acceptable option. This can be fixed with ;;;###autoload (make-variable-buffer-local 'compilation-next-error-function) Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."