From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#14591: New keyword :local for defcustom Date: Fri, 14 Jun 2013 15:06:06 +0200 Message-ID: References: <2wtxl3xmrf.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1371215232 12976 80.91.229.3 (14 Jun 2013 13:07:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Jun 2013 13:07:12 +0000 (UTC) Cc: 14591@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 14 15:07:12 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UnTif-0004Vj-G5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jun 2013 15:07:09 +0200 Original-Received: from localhost ([::1]:41107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnTie-0006mJ-UZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jun 2013 09:07:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnTia-0006m2-DM for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2013 09:07:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnTiZ-0002oi-4U for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2013 09:07:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnTiZ-0002oX-11 for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2013 09:07:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UnTiY-0001yq-Bh for bug-gnu-emacs@gnu.org; Fri, 14 Jun 2013 09:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jun 2013 13:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14591 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 14591-submit@debbugs.gnu.org id=B14591.13712152167592 (code B ref 14591); Fri, 14 Jun 2013 13:07:02 +0000 Original-Received: (at 14591) by debbugs.gnu.org; 14 Jun 2013 13:06:56 +0000 Original-Received: from localhost ([127.0.0.1]:43552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UnTiQ-0001yK-RJ for submit@debbugs.gnu.org; Fri, 14 Jun 2013 09:06:55 -0400 Original-Received: from mail-ee0-f42.google.com ([74.125.83.42]:50244) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UnTiO-0001y0-6q for 14591@debbugs.gnu.org; Fri, 14 Jun 2013 09:06:52 -0400 Original-Received: by mail-ee0-f42.google.com with SMTP id c4so354251eek.1 for <14591@debbugs.gnu.org>; Fri, 14 Jun 2013 06:06:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=R5j2vKrvMBOjjR7UqPu6x3UtEqsnLQCWU6sMStbz/yA=; b=zAXxI22bJFM8JkkUY46F/p+y7mXhDKbyaNb77vfiNP2lOG4qU5lwVybUl6Ab4yNzaS vXA/pWxe/qxz3eB/yy5iAWBXSXEgeb18olwT3whA+mETLUIORRoPpUSccC8e5bJeMvSJ Y/D0ONZWnOfrPKZRtn8qEPZuCltmS5ki0y5R/2YW07zW39j3ZIe6j7vXlvmu97ooUm9w ed2pzZJLEqLNcSTGPCy5hjy0J5mTDGudAGrZUueLNs8tHVQ3dja0zbqYx6iTYvwsi5SU t2EMogjyzLXHVH0ZtHoCtI1imWQicBV3AhJatu3v1J3QYTVGnnhvfR3BdU+j1CVZ1XiI 19IA== X-Received: by 10.14.2.7 with SMTP id 7mr2943128eee.99.1371215206359; Fri, 14 Jun 2013 06:06:46 -0700 (PDT) Original-Received: by 10.14.142.4 with HTTP; Fri, 14 Jun 2013 06:06:06 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75108 Archived-At: > No. Well, there are only two defcustom permanent-locals which are not automatically buffer-local, and I wouldn't be surprised to discover that they should, in fact, be. In any case, it's a corner case not worth catering to. === modified file 'lisp/custom.el' --- lisp/custom.el 2013-01-02 16:13:04 +0000 +++ lisp/custom.el 2013-06-14 12:10:30 +0000 @@ -173,6 +173,11 @@ (put symbol 'risky-local-variable value)) ((eq keyword :safe) (put symbol 'safe-local-variable value)) + ((eq keyword :local) + (when (memq value '(t permanent)) + (make-variable-buffer-local symbol)) + (when (eq value 'permanent) + (put symbol 'permanent-local t))) ((eq keyword :type) (put symbol 'custom-type (purecopy value))) ((eq keyword :options) @@ -246,6 +251,9 @@ :risky Set SYMBOL's `risky-local-variable' property to VALUE. :safe Set SYMBOL's `safe-local-variable' property to VALUE. See Info node `(elisp) File Local Variables'. +:local If VALUE is t, mark SYMBOL as automatically buffer-local. + If VALUE is `permanent', also set SYMBOL's `permanent-local' + property to t. The following common keywords are also meaningful.