Hi, I think the following patch does the trick. Here is what I tested with it: - A call to `clean-buffer-list' cleans up the list once and does not activate the midnight-timer. - The midnight mode is toggled on/off by calling `midnight-mode'. - Calling (customize-variable 'midnight-delay) stops and restarts the midnight-timer with the updated delay. Maybe the line ":initialize #'custom-initialize-default" could be removed, I don't know. WDYT?