diff options
| author | Katsumi Yamaoka | 2009-09-09 09:29:29 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2009-09-09 09:29:29 +0000 |
| commit | cdce0b331faad4c64ae4b3015318db87499a1f92 (patch) | |
| tree | bbac90dfcbdc7a9772a30d739e116f10b8b27973 | |
| parent | de0bdfe7aa97030b6174aba37f245c2bbf2d4ee5 (diff) | |
| download | emacs-cdce0b331faad4c64ae4b3015318db87499a1f92.tar.gz emacs-cdce0b331faad4c64ae4b3015318db87499a1f92.zip | |
* calendar/time-date.el (autoload):
Expand define-obsolete-function-alias into defalias and make-obsolete
for old Emacsen that Gnus supports.
(with-no-warnings): Define it for old Emacsen.
(time-to-seconds): Don't use (featurep 'xemacs) to check if float-time
is available.
(time-to-number-of-days): Don't use (featurep 'xemacs) to check if
float-time is available; suppress compile warning for time-to-seconds.
2009-09-09 Teodor Zlatanov <tzz@lifelogs.com>
* net/imap.el (imap-message-map): Docstring fix.
| -rw-r--r-- | lisp/ChangeLog | 15 | ||||
| -rw-r--r-- | lisp/calendar/time-date.el | 41 | ||||
| -rw-r--r-- | lisp/net/imap.el | 2 |
3 files changed, 44 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e55f23fa0db..a173f58335a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2009-09-09 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * calendar/time-date.el (autoload): | ||
| 4 | Expand define-obsolete-function-alias into defalias and make-obsolete | ||
| 5 | for old Emacsen that Gnus supports. | ||
| 6 | (with-no-warnings): Define it for old Emacsen. | ||
| 7 | (time-to-seconds): Don't use (featurep 'xemacs) to check if float-time | ||
| 8 | is available. | ||
| 9 | (time-to-number-of-days): Don't use (featurep 'xemacs) to check if | ||
| 10 | float-time is available; suppress compile warning for time-to-seconds. | ||
| 11 | |||
| 12 | 2009-09-09 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 13 | |||
| 14 | * net/imap.el (imap-message-map): Docstring fix. | ||
| 15 | |||
| 1 | 2009-09-09 Glenn Morris <rgm@gnu.org> | 16 | 2009-09-09 Glenn Morris <rgm@gnu.org> |
| 2 | 17 | ||
| 3 | * ffap.el (ffap-file-at-point): Handle absolute (non-remote) files with | 18 | * ffap.el (ffap-file-at-point): Handle absolute (non-remote) files with |
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index 4521398d2d4..ec0c8dc8bee 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el | |||
| @@ -114,17 +114,27 @@ and type 2 is the list (HIGH LOW MICRO)." | |||
| 114 | ;; Bit of a mess. Emacs has float-time since at least 21.1. | 114 | ;; Bit of a mess. Emacs has float-time since at least 21.1. |
| 115 | ;; This file is synced to Gnus, and XEmacs packages may have been written | 115 | ;; This file is synced to Gnus, and XEmacs packages may have been written |
| 116 | ;; using time-to-seconds from the Gnus library. | 116 | ;; using time-to-seconds from the Gnus library. |
| 117 | ;;;###autoload(if (featurep 'xemacs) | 117 | ;;;###autoload(if (and (fboundp 'float-time) |
| 118 | ;;;###autoload (autoload 'time-to-seconds "time-date") | 118 | ;;;###autoload (subrp (symbol-function 'float-time))) |
| 119 | ;;;###autoload (define-obsolete-function-alias 'time-to-seconds 'float-time "21.1")) | 119 | ;;;###autoload (progn |
| 120 | 120 | ;;;###autoload (defalias 'time-to-seconds 'float-time) | |
| 121 | (if (featurep 'xemacs) | 121 | ;;;###autoload (make-obsolete 'time-to-seconds 'float-time "21.1")) |
| 122 | ;;;###autoload (autoload 'time-to-seconds "time-date")) | ||
| 123 | |||
| 124 | (eval-and-compile | ||
| 125 | (unless (and (fboundp 'float-time) | ||
| 126 | (subrp (symbol-function 'float-time))) | ||
| 122 | (defun time-to-seconds (time) | 127 | (defun time-to-seconds (time) |
| 123 | "Convert time value TIME to a floating point number." | 128 | "Convert time value TIME to a floating point number." |
| 124 | (with-decoded-time-value ((high low micro time)) | 129 | (with-decoded-time-value ((high low micro time)) |
| 125 | (+ (* 1.0 high 65536) | 130 | (+ (* 1.0 high 65536) |
| 126 | low | 131 | low |
| 127 | (/ micro 1000000.0))))) | 132 | (/ micro 1000000.0)))))) |
| 133 | |||
| 134 | (eval-when-compile | ||
| 135 | (unless (fboundp 'with-no-warnings) | ||
| 136 | (defmacro with-no-warnings (&rest body) | ||
| 137 | `(progn ,@body)))) | ||
| 128 | 138 | ||
| 129 | ;;;###autoload | 139 | ;;;###autoload |
| 130 | (defun seconds-to-time (seconds) | 140 | (defun seconds-to-time (seconds) |
| @@ -248,12 +258,17 @@ The Gregorian date Sunday, December 31, 1bce is imaginary." | |||
| 248 | (- (/ (1- year) 100)) ; - century years | 258 | (- (/ (1- year) 100)) ; - century years |
| 249 | (/ (1- year) 400)))) ; + Gregorian leap years | 259 | (/ (1- year) 400)))) ; + Gregorian leap years |
| 250 | 260 | ||
| 251 | (defun time-to-number-of-days (time) | 261 | (eval-and-compile |
| 252 | "Return the number of days represented by TIME. | 262 | (if (and (fboundp 'float-time) |
| 263 | (subrp (symbol-function 'float-time))) | ||
| 264 | (defun time-to-number-of-days (time) | ||
| 265 | "Return the number of days represented by TIME. | ||
| 266 | The number of days will be returned as a floating point number." | ||
| 267 | (/ (float-time time) (* 60 60 24))) | ||
| 268 | (defun time-to-number-of-days (time) | ||
| 269 | "Return the number of days represented by TIME. | ||
| 253 | The number of days will be returned as a floating point number." | 270 | The number of days will be returned as a floating point number." |
| 254 | (/ (if (featurep 'xemacs) | 271 | (/ (with-no-warnings (time-to-seconds time)) (* 60 60 24))))) |
| 255 | (time-to-seconds time) | ||
| 256 | (float-time time)) (* 60 60 24))) | ||
| 257 | 272 | ||
| 258 | ;;;###autoload | 273 | ;;;###autoload |
| 259 | (defun safe-date-to-time (date) | 274 | (defun safe-date-to-time (date) |
diff --git a/lisp/net/imap.el b/lisp/net/imap.el index fb5dc2ac60c..6393e8a5c90 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el | |||
| @@ -1689,7 +1689,7 @@ is non-nil return these properties." | |||
| 1689 | propname))) | 1689 | propname))) |
| 1690 | 1690 | ||
| 1691 | (defun imap-message-map (func propname &optional buffer) | 1691 | (defun imap-message-map (func propname &optional buffer) |
| 1692 | "Map a function across each mailbox in `imap-message-data', returning a list." | 1692 | "Map a function across each message in `imap-message-data', returning a list." |
| 1693 | (with-current-buffer (or buffer (current-buffer)) | 1693 | (with-current-buffer (or buffer (current-buffer)) |
| 1694 | (let (result) | 1694 | (let (result) |
| 1695 | (mapatoms | 1695 | (mapatoms |