aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
authorDavid Aspinall2001-08-30 14:18:41 +0000
committerDavid Aspinall2001-08-30 14:18:41 +0000
commitc8912a9a56dbbfc7b9f4722c430bcff253cbc395 (patch)
treeac2bdcd311880b98690e7fc2ed9fd68de805a831 /generic
parent1ae6589f077f76de8d279ac5fc5d4301792ba51e (diff)
Added implementation of remassq for FSF Emacs
Diffstat (limited to 'generic')
-rw-r--r--generic/proof-compat.el15
1 files changed, 15 insertions, 0 deletions
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