From 800d26890ae8c76f031a80b8fbad383e1f4cf19a Mon Sep 17 00:00:00 2001 From: David Engster Date: Fri, 22 Feb 2013 22:54:37 +0000 Subject: [PATCH] gnus-registry.el (gnus-registry-save): Provide class name when calling `eieio-persistent-read' to avoid "unsafe call" warning Use `condition-case' to stay compatible with older EIEIO versions which only accept one argument --- lisp/gnus/ChangeLog | 7 +++++++ lisp/gnus/gnus-registry.el | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 8de9e89a23d..6642a2082c7 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,10 @@ +2013-02-22 David Engster + + * gnus-registry.el (gnus-registry-save): Provide class name when + calling `eieio-persistent-read' to avoid "unsafe call" warning. Use + `condition-case' to stay compatible with older EIEIO versions which + only accept one argument. + 2013-02-17 Daiki Ueno * mml2015.el (epg-key-user-id-list, epg-user-id-string) diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index e808b1975b4..d4764c08fde 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -296,8 +296,14 @@ This is not required after changing `gnus-registry-cache-file'." (condition-case nil (progn (gnus-message 5 "Reading Gnus registry from %s..." file) - (setq gnus-registry-db (gnus-registry-fixup-registry - (eieio-persistent-read file))) + (setq gnus-registry-db + (gnus-registry-fixup-registry + (condition-case nil + (with-no-warnings + (eieio-persistent-read file 'registry-db)) + ;; Older EIEIO versions do not check the class name. + ('wrong-number-of-arguments + (eieio-persistent-read file))))) (gnus-message 5 "Reading Gnus registry from %s...done" file)) (error (gnus-message -- 2.39.2