Mercurial > hg > xemacs-beta
comparison lisp/autoload.el @ 5076:d555581e3cba
fix issues with display of argument docstrings
-------------------- ChangeLog entries follow: --------------------
lib-src/ChangeLog addition:
2010-02-25 Ben Wing <ben@xemacs.org>
* make-docfile.c:
* make-docfile.c (write_c_args):
Convert newlines to spaces so that argument lists are always on one
line, because that's what function-documentation-1 expects.
lisp/ChangeLog addition:
c2010-02-25 Ben Wing <ben@xemacs.org>
* autoload.el (make-autoload):
Call cl-function-arglist with one arg.
* cl-macs.el (cl-function-arglist):
* cl-macs.el (cl-transform-lambda):
Make cl-function-arglist take only one arg, the arglist; no
function name passed. Also make sure to print () instead of nil
when empty arglist, or function-documentation-1 won't recognize
the arguments: line.
* help.el (function-arglist): If empty arg, don't display extra
space after function name.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Thu, 25 Feb 2010 04:10:52 -0600 |
parents | b0f4adffca7d |
children | 65f5d45edc87 |
comparison
equal
deleted
inserted
replaced
5072:cc74f60c150e | 5076:d555581e3cba |
---|---|
284 (let* ((macrop (memq car '(defmacro defmacro*))) | 284 (let* ((macrop (memq car '(defmacro defmacro*))) |
285 (name (nth 1 form)) | 285 (name (nth 1 form)) |
286 (body (nthcdr (get car 'doc-string-elt) form)) | 286 (body (nthcdr (get car 'doc-string-elt) form)) |
287 (doc (if (stringp (car body)) (pop body)))) | 287 (doc (if (stringp (car body)) (pop body)))) |
288 (if (memq car '(defmacro defmacro* defun defun*)) | 288 (if (memq car '(defmacro defmacro* defun defun*)) |
289 (let ((arglist (nth 2 form)) | 289 (let ((arglist (nth 2 form))) |
290 (placeholder (eval-when-compile (gensym)))) | |
291 (setq doc (concat (or doc "") | 290 (setq doc (concat (or doc "") |
292 "\n\narguments: " | 291 "\n\narguments: " |
293 (cl-function-arglist placeholder arglist t) | 292 (cl-function-arglist arglist) |
294 "\n")))) | 293 "\n")))) |
295 ;; `define-generic-mode' quotes the name, so take care of that | 294 ;; `define-generic-mode' quotes the name, so take care of that |
296 (list 'autoload (if (listp name) name (list 'quote name)) file doc | 295 (list 'autoload (if (listp name) name (list 'quote name)) file doc |
297 (or (and (memq car '(define-skeleton define-derived-mode | 296 (or (and (memq car '(define-skeleton define-derived-mode |
298 define-generic-mode | 297 define-generic-mode |