HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* holidays.el (holiday-christian-holidays): Rename an entry (bug#12289)
[bpt/emacs.git]
/
lisp
/
midnight.el
diff --git
a/lisp/midnight.el
b/lisp/midnight.el
index
a3546fe
..
3c0923d
100644
(file)
--- a/
lisp/midnight.el
+++ b/
lisp/midnight.el
@@
-1,10
+1,9
@@
;;; midnight.el --- run something every midnight, e.g., kill old buffers
;;; midnight.el --- run something every midnight, e.g., kill old buffers
-;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
-;; Author: Sam Steingold <sds@
usa.net
>
-;; Maintainer: Sam Steingold <sds@
usa.net
>
+;; Author: Sam Steingold <sds@
gnu.org
>
+;; Maintainer: Sam Steingold <sds@
gnu.org
>
;; Created: 1998-05-18
;; Keywords: utilities
;; Created: 1998-05-18
;; Keywords: utilities
@@
-40,8
+39,6
@@
(eval-when-compile
(require 'cl))
(eval-when-compile
(require 'cl))
-(require 'timer)
-
(defgroup midnight nil
"Run something every day at midnight."
:group 'calendar
(defgroup midnight nil
"Run something every day at midnight."
:group 'calendar
@@
-67,12
+64,6
@@
call `cancel-timer' or `timer-activate' on `midnight-timer' instead."
;;; time conversion
;;; time conversion
-(defun midnight-time-float (num)
- "Convert the float number of seconds since epoch to the list of 3 integers."
- (let* ((div (ash 1 16)) (1st (floor num div)))
- (list 1st (floor (- num (* (float div) 1st)))
- (round (* 10000000 (mod num 1))))))
-
(defun midnight-buffer-display-time (&optional buffer)
"Return the time-stamp of BUFFER, or current buffer, as float."
(with-current-buffer (or buffer (current-buffer))
(defun midnight-buffer-display-time (&optional buffer)
"Return the time-stamp of BUFFER, or current buffer, as float."
(with-current-buffer (or buffer (current-buffer))
@@
-126,7
+117,7
@@
See also `clean-buffer-list-kill-regexps',
:group 'midnight)
(defcustom clean-buffer-list-kill-never-buffer-names
:group 'midnight)
(defcustom clean-buffer-list-kill-never-buffer-names
- '("*scratch*" "*Messages*"
"*server*"
)
+ '("*scratch*" "*Messages*")
"List of buffer names which will never be killed by `clean-buffer-list'.
See also `clean-buffer-list-kill-never-regexps'.
Note that this does override `clean-buffer-list-kill-regexps' and
"List of buffer names which will never be killed by `clean-buffer-list'.
See also `clean-buffer-list-kill-never-regexps'.
Note that this does override `clean-buffer-list-kill-regexps' and
@@
-205,7
+196,7
@@
The default value is `clean-buffer-list'."
(defun midnight-next ()
"Return the number of seconds till the next midnight."
(defun midnight-next ()
"Return the number of seconds till the next midnight."
- (multiple-value-bind (sec min hrs)
+ (multiple-value-bind (sec min hrs)
(values-list (decode-time))
(- (* 24 60 60) (* 60 60 hrs) (* 60 min) sec)))
(values-list (decode-time))
(- (* 24 60 60) (* 60 60 hrs) (* 60 min) sec)))
@@
-234,5
+225,4
@@
first argument to `run-at-time'."
(provide 'midnight)
(provide 'midnight)
-;; arch-tag: a5979be9-2890-46a3-ba84-791f0a4a6e80
;;; midnight.el ends here
;;; midnight.el ends here