Mercurial > hg > xemacs-beta
diff src/fns.c @ 5583:10f179710250
Deprecate #'remassoc, #'remassq, #'remrassoc, #'remrassq.
src/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
* fns.c (remassoc_no_quit):
* fns.c (remrassq_no_quit):
* fns.c (syms_of_fns):
* fontcolor-tty.c (Fregister_tty_color):
* fontcolor-tty.c (Funregister_tty_color):
* fontcolor-tty.c (Ffind_tty_color):
* lisp.h:
Remove Fremassq, Fremrassq, Fremassoc, Fremrassoc, they're
XEmacs-specific functions and Lisp callers should use (delete*
... :key #'car) anyway. Keep the non-Lisp-visible _no_quit
versions, calling FdeleteX from C with the appropriate arguments
is ungainly.
lisp/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
* obsolete.el:
* obsolete.el (assq-delete-all):
* packages.el (package-provide):
* packages.el (package-suppress):
* mule/cyrillic.el ("Cyrillic-KOI8"):
* mule/cyrillic.el (koi8-u):
* mule/general-late.el (posix-charset-to-coding-system-hash):
* mule/latin.el:
* mule/latin.el (for):
* cl-extra.el:
* cl-extra.el (cl-extra):
* loadup.el (load-history):
Change any uses of #'remassq, #'remassoc and friends to calling
#'delete* with an appropriate key argument. Provide compatibility
implementations, mark them obsolete.
man/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
* lispref/lists.texi (Association Lists):
Don't document #'remassoc, #'remassq and friends in detail;
they're XEmacs-specific and (delete* ... :key #'car) is
preferable.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 09 Oct 2011 12:55:51 +0100 |
parents | 56144c8593a8 |
children | 1a507c4c6c42 |
line wrap: on
line diff
--- a/src/fns.c Sun Oct 09 10:39:09 2011 +0100 +++ b/src/fns.c Sun Oct 09 12:55:51 2011 +0100 @@ -3642,41 +3642,12 @@ return sequence; } -DEFUN ("remassoc", Fremassoc, 2, 2, 0, /* -Delete by side effect any elements of ALIST whose car is `equal' to KEY. -The modified ALIST is returned. If the first member of ALIST has a car -that is `equal' to KEY, there is no way to remove it by side effect; -therefore, write `(setq foo (remassoc key foo))' to be sure of changing -the value of `foo'. -*/ - (key, alist)) -{ - EXTERNAL_LIST_LOOP_DELETE_IF (elt, alist, - (CONSP (elt) && - internal_equal (key, XCAR (elt), 0))); - return alist; -} - Lisp_Object remassoc_no_quit (Lisp_Object key, Lisp_Object alist) { - int speccount = specpdl_depth (); - specbind (Qinhibit_quit, Qt); - return unbind_to_1 (speccount, Fremassoc (key, alist)); -} - -DEFUN ("remassq", Fremassq, 2, 2, 0, /* -Delete by side effect any elements of ALIST whose car is `eq' to KEY. -The modified ALIST is returned. If the first member of ALIST has a car -that is `eq' to KEY, there is no way to remove it by side effect; -therefore, write `(setq foo (remassq key foo))' to be sure of changing -the value of `foo'. -*/ - (key, alist)) -{ - EXTERNAL_LIST_LOOP_DELETE_IF (elt, alist, - (CONSP (elt) && - EQ_WITH_EBOLA_NOTICE (key, XCAR (elt)))); + LIST_LOOP_DELETE_IF (elt, alist, + (CONSP (elt) && + internal_equal (key, XCAR (elt), 0))); return alist; } @@ -3691,36 +3662,6 @@ return alist; } -DEFUN ("remrassoc", Fremrassoc, 2, 2, 0, /* -Delete by side effect any elements of ALIST whose cdr is `equal' to VALUE. -The modified ALIST is returned. If the first member of ALIST has a car -that is `equal' to VALUE, there is no way to remove it by side effect; -therefore, write `(setq foo (remrassoc value foo))' to be sure of changing -the value of `foo'. -*/ - (value, alist)) -{ - EXTERNAL_LIST_LOOP_DELETE_IF (elt, alist, - (CONSP (elt) && - internal_equal (value, XCDR (elt), 0))); - return alist; -} - -DEFUN ("remrassq", Fremrassq, 2, 2, 0, /* -Delete by side effect any elements of ALIST whose cdr is `eq' to VALUE. -The modified ALIST is returned. If the first member of ALIST has a car -that is `eq' to VALUE, there is no way to remove it by side effect; -therefore, write `(setq foo (remrassq value foo))' to be sure of changing -the value of `foo'. -*/ - (value, alist)) -{ - EXTERNAL_LIST_LOOP_DELETE_IF (elt, alist, - (CONSP (elt) && - EQ_WITH_EBOLA_NOTICE (value, XCDR (elt)))); - return alist; -} - /* Like Fremrassq, fast and unsafe; be careful */ Lisp_Object remrassq_no_quit (Lisp_Object value, Lisp_Object alist) @@ -11771,10 +11712,6 @@ DEFSUBR (FdeleteX); DEFSUBR (FremoveX); - DEFSUBR (Fremassoc); - DEFSUBR (Fremassq); - DEFSUBR (Fremrassoc); - DEFSUBR (Fremrassq); DEFSUBR (Fdelete_duplicates); DEFSUBR (Fremove_duplicates); DEFSUBR (Fnreverse);