all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Allen Li <vianchielfaura@gmail.com>
To: 28104@debbugs.gnu.org
Subject: bug#28104: 25.2; autoload defcustom should put safe-local-variable
Date: Tue, 15 Aug 2017 14:30:35 -0700	[thread overview]
Message-ID: <CAJr1M6f_E+czCt+vC-azP2sBDFRMNS+j6hCc=WTuwHfz-VK-sg@mail.gmail.com> (raw)

Generating autoloads for a defcustom form will not put
safe-local-variable.  Given:

;;;###autoload
(defcustom mir-python-hanging-indent-levels 1
  "Number of ‘python-indent-offset’ to use for hanging indentation."
  :type 'integer
  :safe 'integerp)

This generates the following autoloads:

(defvar mir-python-hanging-indent-levels 1 "\
Number of ‘python-indent-offset’ to use for hanging indentation.")

(custom-autoload 'mir-python-hanging-indent-levels "mir-python" t)

It would be useful to also include:

(put 'mir-python-hanging-indent-levels 'safe-local-variable 'integerp)

Otherwise, Emacs will complain about file local variables that are
safe if you do not (require 'foo) in advance, which is very annoying.

In GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8),
modified by Debian
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description: Ubuntu 14.04 LTS





             reply	other threads:[~2017-08-15 21:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 21:30 Allen Li [this message]
2017-08-15 23:57 ` bug#28104: 25.2; autoload defcustom should put safe-local-variable Glenn Morris
2017-08-16  3:29   ` Allen Li
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='CAJr1M6f_E+czCt+vC-azP2sBDFRMNS+j6hCc=WTuwHfz-VK-sg@mail.gmail.com' \
    --to=vianchielfaura@gmail.com \
    --cc=28104@debbugs.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.