diff lisp/autoload.el @ 5070:b0f4adffca7d

fix so that CL docstrings (with &key, etc.) handled properly -------------------- ChangeLog entries follow: -------------------- lisp/ChangeLog addition: 2010-02-23 Ben Wing <ben@xemacs.org> * autoload.el: * autoload.el (make-autoload): * cl-macs.el (cl-function-arglist): * cl-macs.el (cl-transform-lambda): Don't add argument list with the tag "Common Lisp lambda list:"; instead add in "standard" form using "arguments:" and omitting the function name. Add an arg to `cl-function-arglist' to omit the name and use it in autoload.el instead of just hacking it off. * help.el: * help.el (function-arglist): * help.el (function-documentation-1): New. Extract out common code to recognize and/or strip the arglist from documentation into `function-documentation-1'. Use in `function-arglist' and `function-documentation'. Modify `function-arglist' so it looks for the `arguments: ' stuff in all doc strings, not just subrs/autoloads, so that CL functions get recognized properly. Change the regexp used to match "arguments: " specs to allow nested parens inside the arg list (happens when you have a default value specified in a CL arglist).
author Ben Wing <ben@xemacs.org>
date Tue, 23 Feb 2010 01:12:13 -0600
parents e29fcfd8df5f
children d555581e3cba
line wrap: on
line diff
--- a/lisp/autoload.el	Mon Feb 22 22:04:55 2010 -0600
+++ b/lisp/autoload.el	Tue Feb 23 01:12:13 2010 -0600
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 1991-1994, 1997, 2003 Free Software Foundation, Inc.
 ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
-;; Copyright (C) 1996, 2000, 2002, 2003, 2004 Ben Wing.
+;; Copyright (C) 1996, 2000, 2002, 2003, 2004, 2010 Ben Wing.
 
 ;; Original Author: Roland McGrath <roland@gnu.ai.mit.edu>
 ;; Heavily Modified: XEmacs Maintainers
@@ -290,10 +290,8 @@
 		  (placeholder (eval-when-compile (gensym))))
 	      (setq doc (concat (or doc "")
 				"\n\narguments: "
-				(replace-in-string
-				 (cl-function-arglist placeholder arglist)
-				 (format "^(%s ?" placeholder)
-				 "(") "\n"))))
+				(cl-function-arglist placeholder arglist t)
+				"\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