[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/subr.el
From: |
Vinicius Jose Latorre |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/subr.el |
Date: |
Fri, 04 Apr 2003 21:13:45 -0500 |
Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.347 emacs/lisp/subr.el:1.348
*** emacs/lisp/subr.el:1.347 Thu Apr 3 18:13:38 2003
--- emacs/lisp/subr.el Fri Apr 4 21:13:44 2003
***************
*** 176,195 ****
(if (> n 0) (setcdr (nthcdr (- (1- m) n) x) nil))
x))))
! (defun number-sequence (from &optional to)
"Return a sequence of numbers from FROM to TO (both inclusive) as a list.
! The Nth element of the list is (+ FROM N) where N counts from zero.
If TO is nil, it defaults to FROM.
! If TO is less than FROM, the value is nil."
! (if to
! (if (< to from)
! (setq to (1- from)))
! (setq to from))
! (let* ((list (make-list (- (1+ to) from) from))
! (tail list))
! (while (setq tail (cdr tail))
! (setcar tail (setq from (1+ from))))
! list))
(defun remove (elt seq)
"Return a copy of SEQ with all occurrences of ELT removed.
--- 176,198 ----
(if (> n 0) (setcdr (nthcdr (- (1- m) n) x) nil))
x))))
! (defun number-sequence (from &optional to inc)
"Return a sequence of numbers from FROM to TO (both inclusive) as a list.
! INC is the increment used between numbers in the sequence.
! So, the Nth element of the list is (+ FROM (* N INC)) where N counts from
! zero.
! If INC is nil, it defaults to 1 (one).
If TO is nil, it defaults to FROM.
! If TO is less than FROM, the value is nil.
! Note that FROM, TO and INC can be integer or float."
! (if (not to)
! (list from)
! (or inc (setq inc 1))
! (let (seq)
! (while (<= from to)
! (setq seq (cons from seq)
! from (+ from inc)))
! (nreverse seq))))
(defun remove (elt seq)
"Return a copy of SEQ with all occurrences of ELT removed.
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kenichi Handa, 2003/04/02
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kenichi Handa, 2003/04/02
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2003/04/03
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Miles Bader, 2003/04/04
- [Emacs-diffs] Changes to emacs/lisp/subr.el,
Vinicius Jose Latorre <=
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2003/04/08
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2003/04/24