all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Adding rassq-delete-all to lisp/subr.el.
@ 2005-04-19 13:28 Lute Kamstra
  2005-04-19 14:06 ` Lute Kamstra
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Lute Kamstra @ 2005-04-19 13:28 UTC (permalink / raw)


lisp/subr.el currently defines assq-delete-all.  What about providing
rassq-delete-all as well?

Lute.


(defun rassq-delete-all (value alist)
  "Delete from ALIST all elements whose cdr is `eq' to VALUE.
Return the modified alist.
Elements of ALIST that are not conses are ignored."
  (let ((tail alist))
    (while tail
      (when (and (consp (car tail)) (eq (cadr tail) value))
	(setq alist (delq (car tail) alist)))
      (setq tail (cdr tail)))
    alist))

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-04-21 17:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-19 13:28 Adding rassq-delete-all to lisp/subr.el Lute Kamstra
2005-04-19 14:06 ` Lute Kamstra
2005-04-19 15:12 ` David Kastrup
2005-04-19 16:23   ` Lute Kamstra
2005-04-19 16:39     ` David Kastrup
2005-04-21 15:30       ` Richard Stallman
2005-04-21 17:33       ` Lute Kamstra
2005-04-19 22:27 ` Richard Stallman
2005-04-20  9:41   ` Lute Kamstra
2005-04-20 21:42     ` Richard Stallman
2005-04-20 23:23       ` Lute Kamstra
2005-04-21 15:30         ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.