unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* generate autoloads versus eval-expression-print-level (patch)
@ 2008-04-10 23:37 Kevin Ryde
  2008-04-11  1:59 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Ryde @ 2008-04-10 23:37 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]

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  <user42@zip.com.au>

	* 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: autoload.el.print-level.diff --]
[-- Type: text/x-diff, Size: 454 bytes --]

*** 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))

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-04-14  1:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-10 23:37 generate autoloads versus eval-expression-print-level (patch) Kevin Ryde
2008-04-11  1:59 ` Stefan Monnier
2008-04-12 23:07   ` Kevin Ryde
2008-04-13 19:24     ` Stefan Monnier
2008-04-14  0:46       ` Kevin Ryde
2008-04-14  1:53         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).