1 ;;; gnus-clfns.el --- compiler macros for emulating cl functions
2 ;; Copyright (C) 2000 Free Software Foundation, Inc.
4 ;; Author: Kastsumi Yamaoka <yamaoka@jpl.org>
5 ;; Keywords: cl, compile
7 ;; This file is part of GNU Emacs.
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 ;; Boston, MA 02111-1307, USA.
26 ;; Avoid cl runtime functions for FSF Emacsen.
30 (if (featurep 'xemacs)
34 (define-compiler-macro last (&whole form x &optional n)
35 (if (and (fboundp 'last)
36 (subrp (symbol-function 'last)))
52 (while (consp (cdr x))
56 (define-compiler-macro mapc (&whole form fn seq &rest rest)
57 (if (and (fboundp 'mapc)
58 (subrp (symbol-function 'mapc)))
63 (args (list seq ,@rest))
64 (m (apply (function min) (mapcar (function length) args)))
67 (apply fn (mapcar (function (lambda (arg) (nth n arg))) args))
77 ;;; gnus-clfns.el ends here