diff lisp/autoload.el @ 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 308d34e9f07d
children
line wrap: on
line diff
--- 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: "