Mercurial > hg > xemacs-beta
diff src/fns.c @ 5338:8608eadee6ba
Move #'delq, #'delete to Lisp, adding support for sequences.
src/ChangeLog addition:
2011-01-11 Aidan Kehoe <kehoea@parhasard.net>
* device-msw.c (Fmswindows_printer_list): Remove a Fdelete ()
call here, remove the necessity for it.
* fns.c (Fdelete, Fdelq):
* lisp.h:
Move #'delete, #'delq to Lisp, implemented in terms of #'delete*
* select.c (Fown_selection_internal):
* select.c (handle_selection_clear):
Use delq_no_quit() in these functions, don't reimplement it or use
Fdelq(), which is now gone.
lisp/ChangeLog addition:
2011-01-11 Aidan Kehoe <kehoea@parhasard.net>
* subr.el (delete, delq, remove, remq): Move #'remove, #'remq
here, they don't belong in cl-seq.el; move #'delete, #'delq here
from fns.c, implement them in terms of #'delete*, allowing support
for sequences generally.
* update-elc.el (do-autoload-commands): Use #'delete*, not #'delq
here, now the latter's no longer dumped.
* cl-macs.el (delete, delq): Add compiler macros transforming
#'delete and #'delq to #'delete* calls.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Fri, 14 Jan 2011 23:35:29 +0000 |
parents | 287499ff4c5f |
children | 94bbd4792049 a9094f28f9a9 |
line wrap: on
line diff
--- a/src/fns.c Fri Jan 14 23:23:30 2011 +0000 +++ b/src/fns.c Fri Jan 14 23:35:29 2011 +0000 @@ -3137,21 +3137,6 @@ return object; } -DEFUN ("delete", Fdelete, 2, 2, 0, /* -Delete by side effect any occurrences of ELT as a member of LIST. -The modified LIST is returned. Comparison is done with `equal'. -If the first member of LIST is ELT, there is no way to remove it by side -effect; therefore, write `(setq foo (delete element foo))' to be sure -of changing the value of `foo'. -Also see: `remove'. -*/ - (elt, list)) -{ - EXTERNAL_LIST_LOOP_DELETE_IF (list_elt, list, - (internal_equal (elt, list_elt, 0))); - return list; -} - DEFUN ("old-delete", Fold_delete, 2, 2, 0, /* Delete by side effect any occurrences of ELT as a member of LIST. The modified LIST is returned. Comparison is done with `old-equal'. @@ -3166,20 +3151,6 @@ return list; } -DEFUN ("delq", Fdelq, 2, 2, 0, /* -Delete by side effect any occurrences of ELT as a member of LIST. -The modified LIST is returned. Comparison is done with `eq'. -If the first member of LIST is ELT, there is no way to remove it by side -effect; therefore, write `(setq foo (delq element foo))' to be sure of -changing the value of `foo'. -*/ - (elt, list)) -{ - EXTERNAL_LIST_LOOP_DELETE_IF (list_elt, list, - (EQ_WITH_EBOLA_NOTICE (elt, list_elt))); - return list; -} - DEFUN ("old-delq", Fold_delq, 2, 2, 0, /* Delete by side effect any occurrences of ELT as a member of LIST. The modified LIST is returned. Comparison is done with `old-eq'. @@ -11790,9 +11761,7 @@ DEFSUBR (Fposition); DEFSUBR (Ffind); - DEFSUBR (Fdelete); DEFSUBR (Fold_delete); - DEFSUBR (Fdelq); DEFSUBR (Fold_delq); DEFSUBR (FdeleteX); DEFSUBR (FremoveX);