1 |
;;; midnight.el --- run something every midnight, e.g., kill old buffers |
;;; midnight.el --- run something every midnight, e.g., kill old buffers |
2 |
|
|
3 |
;;; Copyright (C) 1998, 2004 Free Software Foundation, Inc. |
;;; Copyright (C) 1998, 2004, 2005 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Sam Steingold <sds@usa.net> |
;; Author: Sam Steingold <sds@usa.net> |
6 |
;; Maintainer: Sam Steingold <sds@usa.net> |
;; Maintainer: Sam Steingold <sds@usa.net> |
215 |
Sets the first argument SYMB (which must be symbol `midnight-delay') |
Sets the first argument SYMB (which must be symbol `midnight-delay') |
216 |
to its second argument TM." |
to its second argument TM." |
217 |
(assert (eq symb 'midnight-delay) t |
(assert (eq symb 'midnight-delay) t |
218 |
"Illegal argument to `midnight-delay-set': `%s'") |
"Invalid argument to `midnight-delay-set': `%s'") |
219 |
(set symb tm) |
(set symb tm) |
220 |
(when (timerp midnight-timer) (cancel-timer midnight-timer)) |
(when (timerp midnight-timer) (cancel-timer midnight-timer)) |
221 |
(setq midnight-timer |
(setq midnight-timer |