From: Dan Nicolaescu Date: Fri, 9 Jul 2010 01:09:50 +0000 (-0700) Subject: Make make-docfile understand DEFUN arguments written in standard C. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~51^2~80^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0508c67f47a9b79684f2f454010a2d086df7f35b;p=emacs.git Make make-docfile understand DEFUN arguments written in standard C. * lib-src/make-docfile.c (write_c_args): Deal with type names in DEFUN arguments. --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index aa9fab0badb..4cbf5dd50f1 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2010-07-09 Dan Nicolaescu + + * make-docfile.c (write_c_args): Deal with type names in DEFUN + arguments. + 2010-07-08 Dan Nicolaescu * update-game-score.c (P_): Remove macro. diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index b3b6b190e48..3df7ec607d9 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -450,9 +450,24 @@ write_c_args (FILE *out, char *func, char *buf, int minargs, int maxargs) for (p = buf; *p; p++) { - char c = *p; + char c; int ident_start = 0; + /* FIXME: this must be made a bit more robust*/ + + /* Skip "register Lisp_Object", this can be removed when we get + rid of "register" for DEFUNs. */ + if (strncmp ("register Lisp_Object", p, 20) == 0) + p += 20; + + if (strncmp ("Lisp_Object", p, 11) == 0) + p += 11; + + if (strncmp ("void", p, 4) == 0) + p += 4; + + c = *p; + /* Notice when we start printing a new identifier. */ if ((('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z')