+(require 'gnus-util)
+(require 'gnus)
+
+(defgroup gnus-undo nil
+ "Undoing in Gnus buffers."
+ :group 'gnus)
+
+(defcustom gnus-undo-limit 2000
+ "The number of undoable actions recorded."
+ :type 'integer
+ :group 'gnus-undo)
+
+(defcustom gnus-undo-mode nil
+ ;; FIXME: This is a buffer-local minor mode which requires running
+ ;; code upon activation/deactivation, so defining it as a defcustom
+ ;; doesn't seem very useful: setting it to non-nil via Customize
+ ;; probably won't do the right thing.
+ "Minor mode for undoing in Gnus buffers."
+ :type 'boolean
+ :group 'gnus-undo)
+
+(defcustom gnus-undo-mode-hook nil
+ "Hook called in all `gnus-undo-mode' buffers."
+ :type 'hook
+ :group 'gnus-undo)