From c8912a9a56dbbfc7b9f4722c430bcff253cbc395 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Thu, 30 Aug 2001 14:18:41 +0000 Subject: Added implementation of remassq for FSF Emacs --- generic/proof-compat.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/generic/proof-compat.el b/generic/proof-compat.el index 742c7fff..a4f2a391 100644 --- a/generic/proof-compat.el +++ b/generic/proof-compat.el @@ -188,6 +188,21 @@ The returned value is one of the following symbols: nil (or history 'shell-command-history))))) +;; Emulate a useful builtin from XEmacs. + +(or (fboundp 'remassq) +(defun remassq (key alist) + "Delete any elements of ALIST whose car is `eq' to KEY. +The modified ALIST is returned." +;; The builtin version deletes by side-effect, but don't bother here. + (let (newalist) + (while alist + (unless (eq key (caar alist)) + (setq newalist (cons (car alist) newalist))) + (setq alist (cdr alist))) + (nreverse newalist)))) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; A naughty hack to completion.el -- cgit v1.2.3