From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Allen Li Newsgroups: gmane.emacs.bugs Subject: bug#28104: 25.2; autoload defcustom should put safe-local-variable Date: Tue, 15 Aug 2017 20:29:53 -0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1502854367 13194 195.159.176.226 (16 Aug 2017 03:32:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 16 Aug 2017 03:32:47 +0000 (UTC) Cc: 28104@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 16 05:32:41 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhp4T-00035k-2W for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Aug 2017 05:32:41 +0200 Original-Received: from localhost ([::1]:42694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhp4Z-0006Ut-I5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Aug 2017 23:32:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhp2v-0005UY-TY for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2017 23:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhp2s-0006lV-IA for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2017 23:31:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dhp2s-0006lI-C8 for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2017 23:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dhp2r-00042W-VF for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2017 23:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Aug 2017 03:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28104 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28104-submit@debbugs.gnu.org id=B28104.150285420215407 (code B ref 28104); Wed, 16 Aug 2017 03:31:01 +0000 Original-Received: (at 28104) by debbugs.gnu.org; 16 Aug 2017 03:30:02 +0000 Original-Received: from localhost ([127.0.0.1]:40097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhp1u-00040C-42 for submit@debbugs.gnu.org; Tue, 15 Aug 2017 23:30:02 -0400 Original-Received: from mail-qt0-f176.google.com ([209.85.216.176]:33921) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhp1r-0003zY-R4 for 28104@debbugs.gnu.org; Tue, 15 Aug 2017 23:30:00 -0400 Original-Received: by mail-qt0-f176.google.com with SMTP id s6so14520653qtc.1 for <28104@debbugs.gnu.org>; Tue, 15 Aug 2017 20:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=WKRLkIiPY92mM4VozLFuNOFVITTZ7hOY8MNQKqUdgDo=; b=YtFomZ6NtSj7+v5kAVzGc7F38GdzIhWVQM8psxEOQJl1fcoocHLQMRB34UHtV0CKc+ 5RDt4i3BA80Ag1OfMgQXrvky233HTGoTnSPkb0s41mtQJZwXVOAQ+SrBwv/NKrTRmrAu 2zdJLG3MonRNxoqovsuWTKybR0jHdLDPa3kZomq8w+dxI7TJiXsv7oHvVqEM0FIm/XFj oKJaBlEA3++frewuULUUcef3nQwH4zumyZtVFdJZ7MNm86ggZKhpJKzwRnxNmslY1ANH U7nI7X0hLd2O455zeVAL8RvAT+nvqoVoCyB/fOCSJFrN8rgJfqUnKLTq3JYy6izIeUh5 Sirg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=WKRLkIiPY92mM4VozLFuNOFVITTZ7hOY8MNQKqUdgDo=; b=Sb4S7Z3yz/suRf+nlK5++GzIm08Z2lEkZxnslZrTDydNc7cvfsyQfopjvjk77xDCP7 GjzvYUo3tVzgR5TJflUQV0b8jgXhSjtHkETpS+7gvvdekDBAqMxPhRweSzKDq2I6Cjft D4YluGOS+p41Vawj8c/OvpVejahuxOQXWX+MwD+IGHTWgtD36gz9zUpC9kUSC8sOBudm guacXlNajmbLV92jvqZ70l1wX1wQUZ2iyqqqlmhf3enhVOH6bxmOQ82qdC46ddN0gPP+ 3mRqc5MgQN5wDlSwe8Tpd0YWES2w3rs+2DzgikRctguyB4JePtHTAwqOmA0QeRZxYRJB cdfg== X-Gm-Message-State: AHYfb5gjbiju41ExAk95Bfa6pq56IGwfBBbNcJVAjs15l5iIIhSBfzA2 GIxhc+mYCynSGYpk6ZvaH/5H8O8G6Q== X-Received: by 10.237.42.226 with SMTP id t89mr393266qtd.242.1502854194149; Tue, 15 Aug 2017 20:29:54 -0700 (PDT) Original-Received: by 10.200.52.237 with HTTP; Tue, 15 Aug 2017 20:29:53 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:135799 Archived-At: On Tue, Aug 15, 2017 at 4:57 PM, Glenn Morris wrote: > > It's rare to need to autoload a defcustom. What are some intended use cases for an autoloaded defcustom? For me, applying safe-local-variable seems like a leading use case. I'm fine with writing (defcustom foo nil "Doc" :safe 'symbolp) ;;;###autoload (put 'foo 'safe-local-variable 'symbolp) But that seems redundant, and especially so in such use cases where you would want to autoload the defcustom. ;;;###autoload (defcustom foo nil "Doc" :safe 'symbolp) ;;;###autoload (put 'foo 'safe-local-variable 'symbolp) You could omit the :safe in defcustom, I suppose, but the inconsistency bugs me; defcustom can be autoloaded and defcustom can set safe-local-variable, but not both at the same time. It makes either feature feel like it was tacked on as an afterthought and not part of a homogeneous whole. > If you need to autoload the safety property, specify it separately, > and autoload just that statement. Otherwise I suppose you could wrap > the defcustom in a progn and autoload the whole thing.