diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-07-05 15:55:38 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-07-05 15:55:38 +0200 |
commit | 26b9564bd53685533f71e6e102f5bbf575e0c6af (patch) | |
tree | 039fd1d8fa7c836a0fc62c19f08c3e07800b0ff1 /lisp/emacs-lisp | |
parent | 62fbeed9a91429a852fed882d8bf30bc04377bf0 (diff) | |
download | emacs-26b9564bd53685533f71e6e102f5bbf575e0c6af.tar.gz emacs-26b9564bd53685533f71e6e102f5bbf575e0c6af.tar.bz2 emacs-26b9564bd53685533f71e6e102f5bbf575e0c6af.zip |
Propagate :safe properties when autoloading defcustoms
* lisp/emacs-lisp/autoload.el (make-autoload): Propagate the :safe
property to the loaddefs file (bug#28104).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index b45984be1d5..9d1ae705976 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -250,7 +250,10 @@ expression, in which case we want to handle forms differently." (custom-autoload ',varname ,file ,(condition-case nil (null (plist-get props :set)) - (error nil)))))) + (error nil))) + ;; Propagate the :safe property to the loaddefs file. + ,@(when-let ((safe (plist-get props :safe))) + `((put ',varname 'safe-local-variable ,safe)))))) ((eq car 'defgroup) ;; In Emacs this is normally handled separately by cus-dep.el, but for |