Subject: bug#28104: 25.2; autoload defcustom should put safe-local-variable

From: Allen Li <[email-masked]>
Date: Tue, 15 Aug 2017 14:30:35 -0700

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