]> git.eshelyaron.com Git - emacs.git/commitdiff
(cl-transform-lambda): Strip &cl-defs
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 Jul 2003 00:23:04 +0000 (00:23 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 Jul 2003 00:23:04 +0000 (00:23 +0000)
thingies from constructors created by defstruct.

lisp/emacs-lisp/cl-macs.el

index a6e081fd0d11002fade861458a7097c5b20d2eeb..ad75714950970be334e45b1571fd2b6a80092ef6 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cl-macs.el --- Common Lisp macros -*-byte-compile-dynamic: t;-*-
 
-;; Copyright (C) 1993 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2003 Free Software Foundation, Inc.
 
 ;; Author: Dave Gillespie <daveg@synaptics.com>
 ;; Version: 2.02
@@ -266,7 +266,12 @@ ARGLIST allows full Common Lisp conventions."
             (nconc (let ((hdr (nreverse header)))
                      (require 'help-fns)
                      (cons (help-add-fundoc-usage
-                            (if (stringp (car hdr)) (pop hdr)) orig-args)
+                            (if (stringp (car hdr)) (pop hdr))
+                            ;; orig-args can contain &cl-defs (an internal CL
+                            ;; thingy that I do not understand), so remove it.
+                            (let ((x (memq '&cl-defs orig-args)))
+                              (if (null x) orig-args
+                                (delq (car x) (remq (cadr x) orig-args)))))
                            hdr))
                    (list (nconc (list 'let* bind-lets)
                                 (nreverse bind-forms) body)))))))