]> git.eshelyaron.com Git - emacs.git/commitdiff
(loadhist-unload-element): Implement also for 'define-widget'
authorEshel Yaron <me@eshelyaron.com>
Mon, 20 Jan 2025 07:54:46 +0000 (08:54 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 20 Jan 2025 07:54:46 +0000 (08:54 +0100)
lisp/loadhist.el

index 1a6f434561edb1a62132bce25dd4d189cb075d7a..a6a6f8fb2cfb5d125d714bca852205a4ef59ad6b 100644 (file)
@@ -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.