changeset 4702:eb1a409c317b

Unbreak autoload.el 2009-09-28 Mike Sperber <mike@xemacs.org> * autoload.el (make-autoload): Only try to add arguments to documentation when the form actually allows it. * cl-macs.el (cl-function-arglist): Add autoload; used in autoload.el.
author Mike Sperber <sperber@deinprogramm.de>
date Mon, 28 Sep 2009 18:04:07 +0200
parents 684f0ed6cd4f
children 6dfca4f26f53
files lisp/ChangeLog lisp/autoload.el lisp/cl-macs.el
diffstat 3 files changed, 18 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Sep 27 20:37:44 2009 +0100
+++ b/lisp/ChangeLog	Mon Sep 28 18:04:07 2009 +0200
@@ -1,3 +1,10 @@
+2009-09-28  Mike Sperber  <mike@xemacs.org>
+
+	* autoload.el (make-autoload): Only try to add arguments to
+	documentation when the form actually allows it.
+
+	* cl-macs.el (cl-function-arglist): Add autoload; used in autoload.el.
+
 2009-09-27  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* cus-edit.el (custom-variable-prompt): 
--- a/lisp/autoload.el	Sun Sep 27 20:37:44 2009 +0100
+++ b/lisp/autoload.el	Mon Sep 28 18:04:07 2009 +0200
@@ -283,17 +283,17 @@
      ((memq car autoload-make-autoload-operators)
       (let* ((macrop (memq car '(defmacro defmacro*)))
 	     (name (nth 1 form))
-             (arglist (nth 2 form))
 	     (body (nthcdr (get car 'doc-string-elt) form))
-             (placeholder (eval-when-compile (gensym)))
-             (doc (concat (if (stringp (car body))
-                              (pop body)
-                            "")
-                          "\n\narguments: "
-                          (replace-in-string
-                           (cl-function-arglist placeholder arglist)
-                           (format "^(%s ?" placeholder)
-                           "(") "\n")))
+	     (doc (if (stringp (car body)) (pop body))))
+	(if (memq car '(defmacro defmacro* defun defun*))
+	    (let ((arglist (nth 2 form))
+		  (placeholder (eval-when-compile (gensym))))
+	      (setq doc (concat (or doc "")
+				"\n\narguments: "
+				(replace-in-string
+				 (cl-function-arglist placeholder arglist)
+				 (format "^(%s ?" placeholder)
+				 "(") "\n"))))
 	;; `define-generic-mode' quotes the name, so take care of that
 	(list 'autoload (if (listp name) name (list 'quote name)) file doc
 	      (or (and (memq car '(define-skeleton define-derived-mode
--- a/lisp/cl-macs.el	Sun Sep 27 20:37:44 2009 +0100
+++ b/lisp/cl-macs.el	Mon Sep 28 18:04:07 2009 +0200
@@ -298,6 +298,7 @@
 	(t arg)))                         ; Maybe we are in initializer
 
 ;; npak@ispras.ru
+;;;###autoload
 (defun cl-function-arglist (name arglist)
   "Returns string with printed representation of arguments list.
 Supports Common Lisp lambda lists."