From: Stefan Kangas Date: Sun, 26 Dec 2021 16:51:15 +0000 (+0100) Subject: Prefer the defcustom :risky property in gnus X-Git-Tag: emacs-29.0.90~3426 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d8fc436bbb73634bae4b57a1a92ec6588ed2c5b1;p=emacs.git Prefer the defcustom :risky property in gnus * lisp/gnus/gnus-art.el (gnus-button-alist) (gnus-header-button-alist): * lisp/gnus/gnus-group.el (gnus-group-highlight) (gnus-group-icon-list): * lisp/gnus/gnus-sum.el (gnus-summary-highlight): * lisp/gnus/mm-util.el (mm-charset-eval-alist): Prefer the defcustom :risky property to setting 'risky-local-variable manually. --- diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 3b3564fc30a..545b55bbea5 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -7935,8 +7935,8 @@ variable is the real callback function." (function :tag "Callback") (repeat :tag "Par" :inline t - (integer :tag "Regexp group"))))) -(put 'gnus-button-alist 'risky-local-variable t) + (integer :tag "Regexp group")))) + :risky t) (defcustom gnus-header-button-alist '(("^\\(References\\|Message-I[Dd]\\|^In-Reply-To\\):" "<[^<>]+>" @@ -7975,8 +7975,8 @@ HEADER is a regexp to match a header. For a fuller explanation, see (function :tag "Callback") (repeat :tag "Par" :inline t - (integer :tag "Regexp group"))))) -(put 'gnus-header-button-alist 'risky-local-variable t) + (integer :tag "Regexp group")))) + :risky t) ;;; Commands: diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 2ec001faee7..b04293067c8 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -380,8 +380,8 @@ variables in the Lisp expression: `group-age': Time in seconds since the group was last read (see info node `(gnus)Group Timestamp')." :group 'gnus-group-visual - :type '(repeat (cons (sexp :tag "Form") face))) -(put 'gnus-group-highlight 'risky-local-variable t) + :type '(repeat (cons (sexp :tag "Form") face)) + :risky t) (defcustom gnus-new-mail-mark ?% "Mark used for groups with new mail." @@ -409,8 +409,8 @@ requires an understanding of Lisp expressions. Hopefully this will change in a future release. For now, you can use the same variables in the Lisp expression as in `gnus-group-highlight'." :group 'gnus-group-icons - :type '(repeat (cons (sexp :tag "Form") file))) -(put 'gnus-group-icon-list 'risky-local-variable t) + :type '(repeat (cons (sexp :tag "Form") file)) + :risky t) (defcustom gnus-group-name-charset-method-alist nil "Alist of method and the charset for group names. diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index adcc0dbd7b2..cda6712f0d8 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1182,8 +1182,8 @@ mark: The article's mark. uncached: Non-nil if the article is uncached." :group 'gnus-summary-visual :type '(repeat (cons (sexp :tag "Form" nil) - face))) -(put 'gnus-summary-highlight 'risky-local-variable t) + face)) + :risky t) (defcustom gnus-alter-header-function nil "Function called to allow alteration of article header structures. diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index ddc228e4900..a0b3288f13f 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -101,9 +101,9 @@ version, you could use `autoload-coding-system' here." :type '(list (repeat :inline t :tag "Other options" (cons (symbol :tag "charset") - (symbol :tag "form")))) + (symbol :tag "form")))) + :risky t :group 'mime) -(put 'mm-charset-eval-alist 'risky-local-variable t) (defvar mm-charset-override-alist)