`newline' does not respect `standard-output', so use `princ'.
Otherwise you can get \n inserted in the wrong buffer, eg
http://lists.gnu.org/archive/html/emacs-diffs/2013-10/msg00379.html
+2013-10-30 Glenn Morris <rgm@gnu.org>
+
+ * emacs-lisp/autoload.el (autoload-generate-file-autoloads):
+ `newline' does not respect `standard-output', so use `princ'.
+
2013-10-30 Alp Aker <alp.tekin.aker@gmail.com>
Ensure unmarking in buffer menu clears 'S' marks. (Bug#15761)
(princ `(push (purecopy
',(cons (intern package) version))
package--builtin-versions))
- (newline)))))
+ (princ "\n")))))
(goto-char (point-min))
(while (not (eobp))