From: Allen Li <vianchielfaura@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: 28104@debbugs.gnu.org
Subject: bug#28104: 25.2; autoload defcustom should put safe-local-variable
Date: Tue, 15 Aug 2017 20:29:53 -0700 [thread overview]
Message-ID: <CAJr1M6eLzFjHZS_aQ8_wE--GwLZTzRXWkgwVACkgTXZBN6be-w@mail.gmail.com> (raw)
In-Reply-To: <cwbmngcrk1.fsf@fencepost.gnu.org>
On Tue, Aug 15, 2017 at 4:57 PM, Glenn Morris <rgm@gnu.org> 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.
next prev parent reply other threads:[~2017-08-16 3:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-15 21:30 bug#28104: 25.2; autoload defcustom should put safe-local-variable Allen Li
2017-08-15 23:57 ` Glenn Morris
2017-08-16 3:29 ` Allen Li [this message]
2021-07-05 13:56 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJr1M6eLzFjHZS_aQ8_wE--GwLZTzRXWkgwVACkgTXZBN6be-w@mail.gmail.com \
--to=vianchielfaura@gmail.com \
--cc=28104@debbugs.gnu.org \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.