summaryrefslogtreecommitdiff
path: root/lisp/midnight.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/midnight.el')
-rw-r--r--lisp/midnight.el6
1 files changed, 1 insertions, 5 deletions
diff --git a/lisp/midnight.el b/lisp/midnight.el
index 062d3fae09f..48e4c203c8f 100644
--- a/lisp/midnight.el
+++ b/lisp/midnight.el
@@ -215,11 +215,7 @@ to its second argument."
(when (timerp midnight-timer) (cancel-timer midnight-timer))
(setq midnight-timer
(run-at-time (if (numberp tm) (+ (midnight-next) tm) tm)
- midnight-period 'midnight-timer-function)))
-
-(defun midnight-timer-function ()
- "This is the function run by the `midnight-mode' timer once each day."
- (run-hooks 'midnight-hook))
+ midnight-period 'run-hooks 'midnight-hook)))
(defcustom midnight-delay 3600
"*The number of seconds after the midnight when the `midnight-timer' is run.