-;; cl.el --- Common Lisp extensions for GNU Emacs Lisp
+;;; cl.el --- Common Lisp extensions for GNU Emacs Lisp
;; Copyright (C) 1993 Free Software Foundation, Inc.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 1, or (at your option)
+;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
-;; Commentary:
+;;; Commentary:
;; These are extensions to Emacs Lisp that provide a degree of
;; Common Lisp compatibility, beyond what is already built-in
;; package which should always be present.
-;; Future notes:
+;;; Future notes:
;; Once Emacs 19 becomes standard, many things in this package which are
;; messy for reasons of compatibility can be greatly simplified. For now,
;; I prefer to maintain one unified version.
-;; Change Log:
+;;; Change Log:
;; Version 2.02 (30 Jul 93):
;; * Added "cl-compat.el" file, extra compatibility with old package.
;; * First public release of this package.
-;; Code:
+;;; Code:
(defvar cl-emacs-type (cond ((or (and (fboundp 'epoch::version)
(symbol-value 'epoch::version))
(defalias 'macroexpand 'cl-macroexpand)))
(defun cl-macroexpand (cl-macro &optional cl-env)
+ "Return result of expanding macros at top level of FORM.
+If FORM is not a macro call, it is returned unchanged.
+Otherwise, the macro is expanded and the expansion is considered
+in place of FORM. When a non-macro-call results, it is returned.
+
+The second optional arg ENVIRONMENT species an environment of macro
+definitions to shadow the loaded ones for use in file byte-compilation."
(let ((cl-macro-environment cl-env))
(while (progn (setq cl-macro (funcall cl-old-macroexpand cl-macro cl-env))
(and (symbolp cl-macro)