changeset 5578:4a6f90020a59

Avoid redundant arglist information, #'make-autoload. lisp/ChangeLog addition: 2011-10-04 Aidan Kehoe <kehoea@parhasard.net> * autoload.el (make-autoload): Don't add arglist info to the autoload form's docstring if the arglist info is already there.
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 04 Oct 2011 10:59:17 +0100
parents 0b6e7ae1e78f
children 3e621ba12d36
files lisp/ChangeLog lisp/autoload.el
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Oct 04 09:02:14 2011 +0100
+++ b/lisp/ChangeLog	Tue Oct 04 10:59:17 2011 +0100
@@ -1,3 +1,9 @@
+2011-10-04  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* autoload.el (make-autoload):
+	Don't add arglist info to the autoload form's docstring if the
+	arglist info is already there.
+
 2011-10-04  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* bytecomp.el (byte-compile-funcall):
--- a/lisp/autoload.el	Tue Oct 04 09:02:14 2011 +0100
+++ b/lisp/autoload.el	Tue Oct 04 10:59:17 2011 +0100
@@ -283,7 +283,11 @@
 	     (name (nth 1 form))
 	     (body (nthcdr (get car 'doc-string-elt) form))
 	     (doc (if (stringp (car body)) (pop body))))
-	(if (memq car '(defmacro defmacro* defun defun*))
+	(if (and (memq car '(defmacro defmacro* defun defun*))
+                 (not (and doc (save-match-data
+                                 (string-match
+                                  "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'"
+                                  doc)))))
 	    (let ((arglist (nth 2 form)))
 	      (setq doc (concat (or doc "")
 				"\n\narguments: "