emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/cl-seq.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/cl-seq.el
Date: Fri, 04 Apr 2003 01:21:57 -0500

Index: emacs/lisp/emacs-lisp/cl-seq.el
diff -c emacs/lisp/emacs-lisp/cl-seq.el:1.10 
emacs/lisp/emacs-lisp/cl-seq.el:1.11
*** emacs/lisp/emacs-lisp/cl-seq.el:1.10        Fri Jan 25 13:46:37 2002
--- emacs/lisp/emacs-lisp/cl-seq.el     Fri Sep 27 18:19:22 2002
***************
*** 48,61 ****
      (error "Tried to load `cl-seq' before `cl'!"))
  
  
- ;;; We define these here so that this file can compile without having
- ;;; loaded the cl.el file already.
- 
- (defmacro cl-push (x place) (list 'setq place (list 'cons x place)))
- (defmacro cl-pop (place)
-   (list 'car (list 'prog1 place (list 'setq place (list 'cdr place)))))
- 
- 
  ;;; Keyword parsing.  This is special-cased here so that we can compile
  ;;; this file independent from cl-macs.
  
--- 48,53 ----
***************
*** 140,154 ****
      (setq cl-seq (subseq cl-seq cl-start cl-end))
      (if cl-from-end (setq cl-seq (nreverse cl-seq)))
      (let ((cl-accum (cond ((memq :initial-value cl-keys) cl-initial-value)
!                         (cl-seq (cl-check-key (cl-pop cl-seq)))
                          (t (funcall cl-func)))))
        (if cl-from-end
          (while cl-seq
!           (setq cl-accum (funcall cl-func (cl-check-key (cl-pop cl-seq))
                                    cl-accum)))
        (while cl-seq
          (setq cl-accum (funcall cl-func cl-accum
!                                 (cl-check-key (cl-pop cl-seq))))))
        cl-accum)))
  
  (defun fill (seq item &rest cl-keys)
--- 132,146 ----
      (setq cl-seq (subseq cl-seq cl-start cl-end))
      (if cl-from-end (setq cl-seq (nreverse cl-seq)))
      (let ((cl-accum (cond ((memq :initial-value cl-keys) cl-initial-value)
!                         (cl-seq (cl-check-key (pop cl-seq)))
                          (t (funcall cl-func)))))
        (if cl-from-end
          (while cl-seq
!           (setq cl-accum (funcall cl-func (cl-check-key (pop cl-seq))
                                    cl-accum)))
        (while cl-seq
          (setq cl-accum (funcall cl-func cl-accum
!                                 (cl-check-key (pop cl-seq))))))
        cl-accum)))
  
  (defun fill (seq item &rest cl-keys)
***************
*** 518,524 ****
        (or cl-end (setq cl-end (length cl-seq)))
        (if (consp cl-seq) (setq cl-seq (nthcdr cl-start cl-seq)))
        (while (< cl-start cl-end)
!       (setq cl-x (if (consp cl-seq) (cl-pop cl-seq) (aref cl-seq cl-start)))
        (if (cl-check-test cl-item cl-x) (setq cl-count (1+ cl-count)))
        (setq cl-start (1+ cl-start)))
        cl-count)))
--- 510,516 ----
        (or cl-end (setq cl-end (length cl-seq)))
        (if (consp cl-seq) (setq cl-seq (nthcdr cl-start cl-seq)))
        (while (< cl-start cl-end)
!       (setq cl-x (if (consp cl-seq) (pop cl-seq) (aref cl-seq cl-start)))
        (if (cl-check-test cl-item cl-x) (setq cl-count (1+ cl-count)))
        (setq cl-start (1+ cl-start)))
        cl-count)))
***************
*** 618,625 ****
        (while (and cl-seq1 cl-seq2)
        (if (funcall cl-pred (cl-check-key (car cl-seq2))
                     (cl-check-key (car cl-seq1)))
!           (cl-push (cl-pop cl-seq2) cl-res)
!         (cl-push (cl-pop cl-seq1) cl-res)))
        (coerce (nconc (nreverse cl-res) cl-seq1 cl-seq2) cl-type))))
  
  ;;; See compiler macro in cl-macs.el
--- 610,617 ----
        (while (and cl-seq1 cl-seq2)
        (if (funcall cl-pred (cl-check-key (car cl-seq2))
                     (cl-check-key (car cl-seq1)))
!           (push (pop cl-seq2) cl-res)
!         (push (pop cl-seq1) cl-res)))
        (coerce (nconc (nreverse cl-res) cl-seq1 cl-seq2) cl-type))))
  
  ;;; See compiler macro in cl-macs.el
***************
*** 716,723 ****
           (if (or cl-keys (numberp (car cl-list2)))
               (setq cl-list1 (apply 'adjoin (car cl-list2) cl-list1 cl-keys))
             (or (memq (car cl-list2) cl-list1)
!                (cl-push (car cl-list2) cl-list1)))
!          (cl-pop cl-list2))
         cl-list1)))
  
  (defun nunion (cl-list1 cl-list2 &rest cl-keys)
--- 708,715 ----
           (if (or cl-keys (numberp (car cl-list2)))
               (setq cl-list1 (apply 'adjoin (car cl-list2) cl-list1 cl-keys))
             (or (memq (car cl-list2) cl-list1)
!                (push (car cl-list2) cl-list1)))
!          (pop cl-list2))
         cl-list1)))
  
  (defun nunion (cl-list1 cl-list2 &rest cl-keys)
***************
*** 746,753 ****
                       (apply 'member* (cl-check-key (car cl-list2))
                              cl-list1 cl-keys)
                     (memq (car cl-list2) cl-list1))
!                  (cl-push (car cl-list2) cl-res))
!              (cl-pop cl-list2))
             cl-res)))))
  
  (defun nintersection (cl-list1 cl-list2 &rest cl-keys)
--- 738,745 ----
                       (apply 'member* (cl-check-key (car cl-list2))
                              cl-list1 cl-keys)
                     (memq (car cl-list2) cl-list1))
!                  (push (car cl-list2) cl-res))
!              (pop cl-list2))
             cl-res)))))
  
  (defun nintersection (cl-list1 cl-list2 &rest cl-keys)
***************
*** 772,779 ****
                  (apply 'member* (cl-check-key (car cl-list1))
                         cl-list2 cl-keys)
                (memq (car cl-list1) cl-list2))
!             (cl-push (car cl-list1) cl-res))
!         (cl-pop cl-list1))
        cl-res))))
  
  (defun nset-difference (cl-list1 cl-list2 &rest cl-keys)
--- 764,771 ----
                  (apply 'member* (cl-check-key (car cl-list1))
                         cl-list2 cl-keys)
                (memq (car cl-list1) cl-list2))
!             (push (car cl-list1) cl-res))
!         (pop cl-list1))
        cl-res))))
  
  (defun nset-difference (cl-list1 cl-list2 &rest cl-keys)
***************
*** 817,823 ****
             (while (and cl-list1
                         (apply 'member* (cl-check-key (car cl-list1))
                                cl-list2 cl-keys))
!              (cl-pop cl-list1))
             (null cl-list1)))))
  
  (defun subst-if (cl-new cl-pred cl-tree &rest cl-keys)
--- 809,815 ----
             (while (and cl-list1
                         (apply 'member* (cl-check-key (car cl-list1))
                                cl-list2 cl-keys))
!              (pop cl-list1))
             (null cl-list1)))))
  
  (defun subst-if (cl-new cl-pred cl-tree &rest cl-keys)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]