From: Eshel Yaron Date: Mon, 20 Jan 2025 07:54:46 +0000 (+0100) Subject: (loadhist-unload-element): Implement also for 'define-widget' X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d3093beba4ca7f1818b4c6e4b8f30ec740673b5f;p=emacs.git (loadhist-unload-element): Implement also for 'define-widget' --- diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 1a6f434561e..a6a6f8fb2cf 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -225,6 +225,11 @@ unloading." (dolist (prop props) (put symbol prop nil)))) +(cl-defmethod loadhist-unload-element ((x (head define-widget))) + (let ((name (cdr x))) + (put name 'widget-type nil) + (put name 'widget-documentation nil))) + ;;;###autoload (defun unload-feature (feature &optional force) "Unload the library that provided FEATURE.