From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.devel Subject: generate autoloads versus eval-expression-print-level (patch) Date: Fri, 11 Apr 2008 09:37:34 +1000 Message-ID: <87hce9i8n5.fsf@blah.blah> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1207870690 552 80.91.229.12 (10 Apr 2008 23:38:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Apr 2008 23:38:10 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 11 01:38:42 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jk6Lq-0004dx-CL for ged-emacs-devel@m.gmane.org; Fri, 11 Apr 2008 01:38:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jk6LC-00062q-9C for ged-emacs-devel@m.gmane.org; Thu, 10 Apr 2008 19:38:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jk6L7-00062J-VT for emacs-devel@gnu.org; Thu, 10 Apr 2008 19:37:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jk6L2-00061q-N7 for emacs-devel@gnu.org; Thu, 10 Apr 2008 19:37:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jk6L2-00061n-HK for emacs-devel@gnu.org; Thu, 10 Apr 2008 19:37:52 -0400 Original-Received: from mailout1-4.pacific.net.au ([61.8.2.211] helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jk6L2-0006Ds-2q for emacs-devel@gnu.org; Thu, 10 Apr 2008 19:37:52 -0400 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 6BABA36D038 for ; Fri, 11 Apr 2008 09:37:41 +1000 (EST) Original-Received: from blah.blah (ppp2FD9.dyn.pacific.net.au [61.8.47.217]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id D193027411 for ; Fri, 11 Apr 2008 09:37:40 +1000 (EST) Original-Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1Jk6Kk-0001Fv-P8 for emacs-devel@gnu.org; Fri, 11 Apr 2008 09:37:34 +1000 User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94916 Archived-At: --=-=-= I was trying some update-file-autoloads and generate-file-autoloads via progn forms in a test file, running them with C-M-x. Eg. (progn (switch-to-buffer "x") (require 'autoload) (generate-file-autoloads "foo.el")) I was very confused that my defgroups (in foo.el) like ;;;###autoload (defgroup my-group nil "This is my group." :prefix "my-group-" :group 'applications) would end up in the output with ellipsis like (let ((loads (get ... ...))) (if (member (quote "foo") loads) nil (put (quote my-group) (quote custom-loads) (cons ... loads)))) I guess eval-expression-print-level interferes with what autoloads.el is trying to produce. I wonder autoloads.el could bind print-level like it does print-length, for certainty of output. 2008-04-11 Kevin Ryde * emacs-lisp/autoload.el (autoload-generate-file-autoloads): Bind print-level to ensure defgroup output forms aren't truncated if print-level is set to eval-expression-print-level when going via eval-defun and friends, or has been otherwise fiddled with. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=autoload.el.print-level.diff *** autoload.el 07 Apr 2008 08:04:36 +1000 1.136 --- autoload.el 11 Apr 2008 09:12:19 +1000 *************** *** 335,340 **** --- 335,341 ---- (let ((autoloads-done '()) (load-name (autoload-file-load-name file)) (print-length nil) + (print-level nil) (print-readably t) ; This does something in Lucid Emacs. (float-output-format nil) (visited (get-file-buffer file)) --=-=-=--