* poe-18.el (current-time-string): Fixed leap year's day counting bug.
[elisp/apel.git] / poe-18.el
index e2900ab..0edb4d8 100644 (file)
--- a/poe-18.el
+++ b/poe-18.el
@@ -355,10 +355,8 @@ and from `file-attributes'."
       (setq lyear (and (zerop (% yyyy 4))
                       (or (not (zerop (% yyyy 100)))
                           (zerop (% yyyy 400)))))
-      (while (> (- dd (nth mm mdays)) 0)
-       (if (and (= mm 1) lyear)
-           (setq dd (- dd 29))
-         (setq dd (- dd (nth mm mdays))))
+      (while (> (- dd  (if (and lyear (= mm 1)) 29 (nth mm mdays))) 0)
+       (setq dd (- dd (if (and lyear (= mm 1)) 29 (nth mm mdays))))
        (setq mm (1+ mm)))
       (setq HH (/ low 3600)
            low (% low 3600)
@@ -583,21 +581,6 @@ Fifth arg HIST is ignored in this implementatin."
 Optional argunemt FRAME is ignored in this implementation."
        (si:get-buffer-window buffer))))
 
-;; Add optional argument `all-frames'.
-(or (fboundp 'si:next-window)
-    (progn
-      (fset 'si:next-window (symbol-function 'next-window))
-      (defun next-window (&optional window minibuf all-frames)
-       "Return next window after WINDOW in canonical ordering of windows.
-If omitted, WINDOW defaults to the selected window.
-
-Optional second arg MINIBUF t means count the minibuffer window even
-if not active.  MINIBUF nil or omitted means count the minibuffer iff
-it is active.  MINIBUF neither t nor nil means not to count the
-minibuffer even if it is active.
-Optional third argunemt ALL-FRAMES is ignored in this implementation."
-       (si:next-window window minibuf))))
-
 (defun-maybe walk-windows (proc &optional minibuf all-frames)
   "Cycle through all visible windows, calling PROC for each one.
 PROC is called with a window as argument.