From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r99848: (compilation-save-buffers-predicate): New custom variable. Date: Wed, 07 Apr 2010 15:00:13 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1270667205 25063 80.91.229.12 (7 Apr 2010 19:06:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Apr 2010 19:06:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sam Steingold Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 07 21:06:42 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NzaaD-0002mZ-2X for ged-emacs-devel@m.gmane.org; Wed, 07 Apr 2010 21:06:37 +0200 Original-Received: from localhost ([127.0.0.1]:52423 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzaaB-0001jO-96 for ged-emacs-devel@m.gmane.org; Wed, 07 Apr 2010 15:06:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NzaU5-00058E-3R for emacs-devel@gnu.org; Wed, 07 Apr 2010 15:00:17 -0400 Original-Received: from [140.186.70.92] (port=44810 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzaU3-00057L-N0 for emacs-devel@gnu.org; Wed, 07 Apr 2010 15:00:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NzaU2-0007Vr-8r for emacs-devel@gnu.org; Wed, 07 Apr 2010 15:00:15 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:28349 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzaU2-0007Vk-6b; Wed, 07 Apr 2010 15:00:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAIZzvEvO+K6K/2dsb2JhbACbIXK8PYUJBIs2 X-IronPort-AV: E=Sophos;i="4.52,164,1270440000"; d="scan'208";a="60392352" Original-Received: from 206-248-174-138.dsl.teksavvy.com (HELO pastel.home) ([206.248.174.138]) by ironport2-out.pppoe.ca with ESMTP; 07 Apr 2010 15:00:13 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 13F4B8054; Wed, 7 Apr 2010 15:00:13 -0400 (EDT) In-Reply-To: (Sam Steingold's message of "Wed, 07 Apr 2010 12:20:35 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123323 Archived-At: > ;;;###autoload > +(defcustom compilation-save-buffers-predicate nil > + "The second argument (PRED) passed to `save-some-buffers' before compiling. > +E.g., one can set this to > + (lambda () > + (string-prefix-p my-compilation-root (file-truename (buffer-file-name)))) > +to limit saving to files located under `my-compilation-root'. > +Note, that, in general, `compilation-directory' cannot be used instead > +of `my-compilation-root' here." > + :type '(choice > + (const :tag "Default (save all file-visiting buffers)" nil) > + (const :tag "Save all buffers" t) > + function) > + :group 'compilation) > + > +;;;###autoload - Please don't autoload defcustoms unless you have a *really* good reason to do it (and even then, ask permission first). - I like where this is going, but I'm not sure this is enough. Could you explain how you see it being used? Could you also explain why `compilation-directory' can't be used instead? -- Stefan