Function: eieio-custom-object-apply-reset

eieio-custom-object-apply-reset is a byte-compiled function defined in eieio-custom.el.gz.

Signature

(eieio-custom-object-apply-reset ARG &rest ARGS)

Implementations

((obj eieio-default-superclass)) in `eieio-custom.el'.

Insert an Apply and Reset button into the object editor. Argument OBJ is the object being customized.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/eieio-custom.el.gz
(cl-defmethod eieio-custom-object-apply-reset ((_obj eieio-default-superclass))
  "Insert an Apply and Reset button into the object editor.
Argument OBJ is the object being customized."
  (widget-create 'push-button
		 :notify (lambda (&rest _)
			   (widget-apply eieio-wo :value-get)
			   (eieio-done-customizing eieio-co)
			   (bury-buffer))
		 "Accept")
  (widget-insert "   ")
  (widget-create 'push-button
		 :notify (lambda (&rest _)
			   ;; I think the act of getting it sets
			   ;; its value through the get function.
			   (message "Applying Changes...")
			   (widget-apply eieio-wo :value-get)
			   (eieio-done-customizing eieio-co)
			   (message "Applying Changes...Done"))
		 "Apply")
  (widget-insert "   ")
  (widget-create 'push-button
		 :notify (lambda (&rest _)
			   (message "Resetting")
			   (eieio-customize-object eieio-co eieio-cog))
		 "Reset")
  (widget-insert "   ")
  (widget-create 'push-button
		 :notify (lambda (&rest _)
			   (bury-buffer))
		 "Cancel"))