[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/subr.el
From: |
Kim F . Storm |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/subr.el |
Date: |
Tue, 14 Jun 2005 04:14:07 -0400 |
Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.463 emacs/lisp/subr.el:1.464
*** emacs/lisp/subr.el:1.463 Mon Jun 13 21:29:52 2005
--- emacs/lisp/subr.el Tue Jun 14 08:14:06 2005
***************
*** 963,987 ****
The test for presence of ELEMENT is done with `equal'.
The resulting list is reordered so that the elements are in the
! order given by each element's `list-order' property (a number).
! Elements which are not symbols, and symbol elements without a
! numeric `lisp-order' property are placed at the end of the list.
If the third optional argument ORDER is non-nil and ELEMENT is
! a symbol, set the symbol's `list-order' property to the given value.
The return value is the new value of LIST-VAR."
! (when (and order (symbolp element))
! (put element 'list-order (and (numberp order) order)))
! (add-to-list list-var element)
! (set list-var (sort (symbol-value list-var)
! (lambda (a b)
! (let ((oa (and (symbolp a) (get a 'list-order)))
! (ob (and (symbolp b) (get b 'list-order))))
! (cond
! ((not oa) nil)
! ((not ob) t)
! (t (< oa ob))))))))
;;; Load history
--- 963,998 ----
The test for presence of ELEMENT is done with `equal'.
The resulting list is reordered so that the elements are in the
! order given by each element's numeric list order. Elements which
! are not symbols, and symbol elements without a numeric list order
! are placed at the end of the list.
If the third optional argument ORDER is non-nil and ELEMENT is
! a symbol, set the symbol's list order to the given value.
!
! The list order for each symbol is stored in LIST-VAR's
! `list-order' property.
The return value is the new value of LIST-VAR."
! (let* ((ordering (get list-var 'list-order))
! (cur (and (symbolp element) (assq element ordering))))
! (when order
! (unless (symbolp element)
! (error "cannot specify order for non-symbols"))
! (if cur
! (setcdr cur order)
! (setq cur (cons element order))
! (setq ordering (cons cur ordering))
! (put list-var 'list-order ordering)))
! (add-to-list list-var element)
! (set list-var (sort (symbol-value list-var)
! (lambda (a b)
! (let ((oa (and (symbolp a) (assq a ordering)))
! (ob (and (symbolp b) (assq b ordering))))
! (cond
! ((not oa) nil)
! ((not ob) t)
! (t (< (cdr oa) (cdr ob))))))))))
;;; Load history
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F . Storm, 2005/06/08
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Juanma Barranquero, 2005/06/10
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Stefan Monnier, 2005/06/13
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F . Storm, 2005/06/13
- [Emacs-diffs] Changes to emacs/lisp/subr.el,
Kim F . Storm <=
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Stefan Monnier, 2005/06/15
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F . Storm, 2005/06/20
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Juanma Barranquero, 2005/06/21
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F . Storm, 2005/06/22
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M . Stallman, 2005/06/25
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Luc Teirlinck, 2005/06/27