unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* preloading newcomment.el
@ 2002-10-31  0:11 Stefan Monnier
  2002-11-01  9:40 ` Richard Stallman
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2002-10-31  0:11 UTC (permalink / raw)



Is there any objection to dumping Emacs with newcomment.el (rather
than autoload it) ?

The reason for dumping it is that most of the functions in it
are autoloaded and there's regularly the need to autoload another.
Also because it has to get loaded as soon as someone uses M-; or
auto-filling (in non-text-modes) and because the corresponding
functionality used to be in simple.el.


	Stefan

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

* Re: preloading newcomment.el
  2002-10-31  0:11 preloading newcomment.el Stefan Monnier
@ 2002-11-01  9:40 ` Richard Stallman
  2002-11-01 16:56   ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2002-11-01  9:40 UTC (permalink / raw)
  Cc: emacs-devel

    Is there any objection to dumping Emacs with newcomment.el (rather
    than autoload it) ?

How much size does it add?

    Also because it has to get loaded as soon as someone uses M-; or
    auto-filling (in non-text-modes)

A large fraction of users will never use those modes.

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

* Re: preloading newcomment.el
  2002-11-01  9:40 ` Richard Stallman
@ 2002-11-01 16:56   ` Stefan Monnier
  2002-11-03 13:56     ` Richard Stallman
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2002-11-01 16:56 UTC (permalink / raw)
  Cc: monnier+gnu/emacs, emacs-devel

>     Is there any objection to dumping Emacs with newcomment.el (rather
>     than autoload it) ?
> How much size does it add?

It adds 16388 bytes of pure storage if byte-compiled normally
and 3632 if byte-compile-dynamic is used.


	Stefan

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

* Re: preloading newcomment.el
  2002-11-01 16:56   ` Stefan Monnier
@ 2002-11-03 13:56     ` Richard Stallman
  2002-11-04 14:45       ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2002-11-03 13:56 UTC (permalink / raw)
  Cc: monnier+gnu/emacs, emacs-devel

    It adds 16388 bytes of pure storage if byte-compiled normally
    and 3632 if byte-compile-dynamic is used.

What do you think then of preloading it but using byte-compile-dynamic?

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

* Re: preloading newcomment.el
  2002-11-03 13:56     ` Richard Stallman
@ 2002-11-04 14:45       ` Stefan Monnier
  2002-11-06  4:51         ` Richard Stallman
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2002-11-04 14:45 UTC (permalink / raw)
  Cc: monnier+gnu/emacs, emacs-devel

>     It adds 16388 bytes of pure storage if byte-compiled normally
>     and 3632 if byte-compile-dynamic is used.
> 
> What do you think then of preloading it but using byte-compile-dynamic?

It turns out that it doesn't work: byte-compile-dynamic doesn't work
for preloaded files (because the external reference to the code
is read in as 0 (assuming that it is a docstring reference and
will be filled in by Snarf-documentation).
The problem is "fixed" by the patch below, but it's not
a satisfactory fix (it increases the amount of pure storage used)
and I have no idea how to really fix things.


	Stefan


Index: src/lread.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/lread.c,v
retrieving revision 1.301
diff -u -r1.301 lread.c
--- src/lread.c	30 Oct 2002 19:15:17 -0000	1.301
+++ src/lread.c	4 Nov 2002 14:44:09 -0000
@@ -2844,7 +2844,7 @@
 	       this file is described in the DOC-MM.NN file
 	       and Snarf-documentation will fill in the right value later.
 	       For now, replace the whole list with 0.  */
-	    doc_reference = 1;
+	    doc_reference = 0;
 	  else
 	    /* We have already called Snarf-documentation, so make a relative
 	       file name for this file, so it can be found properly

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

* Re: preloading newcomment.el
  2002-11-04 14:45       ` Stefan Monnier
@ 2002-11-06  4:51         ` Richard Stallman
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Stallman @ 2002-11-06  4:51 UTC (permalink / raw)
  Cc: monnier+gnu/emacs, emacs-devel

    The problem is "fixed" by the patch below, but it's not
    a satisfactory fix (it increases the amount of pure storage used)
    and I have no idea how to really fix things.

To fix it properly requires distinguishing between #$ when it's used
to refer to a doc string and #$ when it's used to refer to the byte
code.  One way to distinguish would be based on position in the
surrounding list.

But I think there's no need to do this now.  The right thing to do now
is just not preload the file.

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

* Preloading newcomment.el
@ 2012-02-23 17:20 Stefan Monnier
  2012-02-23 17:24 ` Glenn Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2012-02-23 17:20 UTC (permalink / raw)
  To: emacs-devel

Any objection to preloading newcomment.el (see bug#10868 for the
current motivation)?


        Stefan



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

* Re: Preloading newcomment.el
  2012-02-23 17:20 Preloading newcomment.el Stefan Monnier
@ 2012-02-23 17:24 ` Glenn Morris
  2012-02-23 21:49   ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2012-02-23 17:24 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier wrote:

> Any objection to preloading newcomment.el (see bug#10868 for the
> current motivation)?

Sounds good for 24.2.



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

* Re: Preloading newcomment.el
  2012-02-23 17:24 ` Glenn Morris
@ 2012-02-23 21:49   ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2012-02-23 21:49 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

>> Any objection to preloading newcomment.el (see bug#10868 for the
>> current motivation)?
> Sounds good for 24.2.

Yes, thanks for clarifying, of course I didn't mean to do that for 24.1.


        Stefan



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

end of thread, other threads:[~2012-02-23 21:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-31  0:11 preloading newcomment.el Stefan Monnier
2002-11-01  9:40 ` Richard Stallman
2002-11-01 16:56   ` Stefan Monnier
2002-11-03 13:56     ` Richard Stallman
2002-11-04 14:45       ` Stefan Monnier
2002-11-06  4:51         ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2012-02-23 17:20 Preloading newcomment.el Stefan Monnier
2012-02-23 17:24 ` Glenn Morris
2012-02-23 21:49   ` 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).