Propagate :safe properties when autoloading defcustoms
* lisp/emacs-lisp/autoload.el (make-autoload): Propagate the :safe property to the loaddefs file (bug#28104).
This commit is contained in:
parent
62fbeed9a9
commit
26b9564bd5
2 changed files with 7 additions and 1 deletions
3
etc/NEWS
3
etc/NEWS
|
@ -2914,6 +2914,9 @@ The former is now declared obsolete.
|
|||
|
||||
* Lisp Changes in Emacs 28.1
|
||||
|
||||
---
|
||||
*** :safe settings in 'defcustom' are now propagated to the loaddefs files.
|
||||
|
||||
+++
|
||||
** New function 'syntax-class-to-char'.
|
||||
This does almost the opposite of 'string-to-syntax' -- it returns the
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue