From 085ca450422395960b3c3f2d2931398d3e9bd4a6 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Tue, 13 May 2003 00:05:08 +0000 Subject: [PATCH] (assq-delete-all): New compiler macro for Emacs 20. --- lisp/ChangeLog | 4 ++++ lisp/dgnushack.el | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cc069bb19..04992064c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2003-05-13 Katsumi Yamaoka + + * dgnushack.el (assq-delete-all): New compiler macro for Emacs 20. + 2003-05-12 Katsumi Yamaoka * lpath.el: Fbind find-coding-system. diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 0b88fd148..1064b5fb4 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -50,6 +50,18 @@ ;; Define compiler macros for the functions provided by cl in old Emacsen. (unless (featurep 'xemacs) + (define-compiler-macro assq-delete-all (&whole form key alist) + (if (>= emacs-major-version 21) + form + `(let* ((key ,key) + (alist ,alist) + (tail alist)) + (while tail + (if (and (consp (car tail)) (eq (car (car tail)) key)) + (setq alist (delq (car tail) alist))) + (setq tail (cdr tail))) + alist))) + (define-compiler-macro butlast (&whole form x &optional n) (if (>= emacs-major-version 21) form -- 2.25.1