[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 26b9564: Propagate :safe properties when autoloading defcustoms
From: |
Lars Ingebrigtsen |
Subject: |
master 26b9564: Propagate :safe properties when autoloading defcustoms |
Date: |
Mon, 5 Jul 2021 09:55:47 -0400 (EDT) |
branch: master
commit 26b9564bd53685533f71e6e102f5bbf575e0c6af
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Propagate :safe properties when autoloading defcustoms
* lisp/emacs-lisp/autoload.el (make-autoload): Propagate the :safe
property to the loaddefs file (bug#28104).
---
etc/NEWS | 3 +++
lisp/emacs-lisp/autoload.el | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index 1a31308..a62e9c8 100644
--- a/etc/NEWS
+++ b/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
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index b45984b..9d1ae70 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 26b9564: Propagate :safe properties when autoloading defcustoms,
Lars Ingebrigtsen <=