* pym.el (static-if): Put t on edebug spec instead of if.
[elisp/apel.git] / poe-18.el
index d3fc2c5..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)
@@ -467,6 +465,8 @@ With optional DIVISOR, return the largest integer no greater than ARG/DIVISOR."
       (- (/ (- divisor 1 arg) divisor))
     (/ arg divisor)))
 
+(defalias 'mod '%)
+
 ;;; @ Basic lisp subroutines.
 ;;;
 
@@ -581,6 +581,27 @@ Fifth arg HIST is ignored in this implementatin."
 Optional argunemt FRAME is ignored in this implementation."
        (si:get-buffer-window buffer))))
 
+(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.
+
+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."
+  (if (window-minibuffer-p (selected-window))
+      (setq minibuf t))
+  (let* ((walk-windows-start (selected-window))
+        (walk-windows-current walk-windows-start))
+    (unwind-protect
+       (while (progn
+                (setq walk-windows-current
+                      (next-window walk-windows-current minibuf))
+                (funcall proc walk-windows-current)
+                (not (eq walk-windows-current walk-windows-start))))
+      (select-window walk-windows-start))))
+
 ;;; @@ Environment variables.
 ;;;
 
@@ -715,68 +736,22 @@ TIMEOUT and TIMEOUT-MSECS are ignored in this implementation."
 ;;; @ Overlay.
 ;;;
 
-(cond
- ((boundp 'NEMACS)
-  (defvar emu:available-face-attribute-alist
-    '(
-      ;;(bold      . inversed-region)
-      (italic    . underlined-region)
-      (underline . underlined-region)))
-
-  ;; by YAMATE Keiichirou 1994/10/28
-  (defun attribute-add-narrow-attribute (attr from to)
-    (or (consp (symbol-value attr))
-       (set attr (list 1)))
-    (let* ((attr-value (symbol-value attr))
-          (len (car attr-value))
-          (posfrom 1)
-          posto)
-      (while (and (< posfrom len)
-                 (> from (nth posfrom attr-value)))
-       (setq posfrom (1+ posfrom)))
-      (setq posto posfrom)
-      (while (and (< posto len)
-                 (> to (nth posto attr-value)))
-       (setq posto (1+ posto)))
-      (if  (= posto posfrom)
-         (if (= (% posto 2) 1)
-             (if (and (< to len)
-                      (= to (nth posto attr-value)))
-                 (set-marker (nth posto attr-value) from)
-               (setcdr (nthcdr (1- posfrom) attr-value)
-                       (cons (set-marker-type (set-marker (make-marker)
-                                                          from)
-                                              'point-type)
-                             (cons (set-marker-type
-                                    (set-marker (make-marker)
-                                                to)
-                                    nil)
-                                   (nthcdr posto attr-value))))
-               (setcar attr-value (+ len 2))))
-       (if (= (% posfrom 2) 0)
-           (setq posfrom (1- posfrom))
-         (set-marker (nth posfrom attr-value) from))
-       (if (= (% posto 2) 0)
-           nil
-         (setq posto (1- posto))
-         (set-marker (nth posto attr-value) to))
-       (setcdr (nthcdr posfrom attr-value)
-               (nthcdr posto attr-value)))))
-
-  (defalias 'make-overlay 'cons)
-
-  (defun overlay-put (overlay prop value)
-    (let ((ret (and (eq prop 'face)
-                   (assq value emu:available-face-attribute-alist))))
-      (if ret
-         (attribute-add-narrow-attribute (cdr ret)
-                                         (car overlay)(cdr overlay))))))
- (t
-  (defun make-overlay (beg end &optional buffer type))
-  (defun overlay-put (overlay prop value))))
-
+(defun overlayp (object))
+(defun make-overlay (beg end &optional buffer front-advance rear-advance))
+(defun move-overlay (overlay beg end &optional buffer))
+(defun delete-overlay (overlay))
+(defun overlay-start (overlay))
+(defun overlay-end (overlay))
 (defun overlay-buffer (overlay))
-
+(defun overlay-properties (overlay))
+(defun overlays-at (pos))
+(defun overlays-in (beg end))
+(defun next-overlay-change (pos))
+(defun previous-overlay-change (pos))
+(defun overlay-lists ())
+(defun overlay-recenter (pos))
+(defun overlay-get (overlay prop))
+(defun overlay-put (overlay prop value))
 
 ;;; @ End.
 ;;;