From xemacs-m  Fri Sep 19 06:01:45 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id GAA04112
	for <xemacs-beta@xemacs.org>; Fri, 19 Sep 1997 06:01:11 -0500 (CDT)
Received: (from hniksic@localhost)
	by jagor.srce.hr (8.8.7/8.8.6) id NAA00802;
	Fri, 19 Sep 1997 13:00:57 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Insinuating packages (was: jka-comp changed)
References: <199709171955.MAA21274@sandman> <ocr3en2pu8b.fsf@ml.com> <m2en6mkp8g.fsf@altair.xemacs.org>
X-Attribution: Hrvoje
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 19 Sep 1997 13:00:56 +0200
In-Reply-To: SL Baur's message of "18 Sep 1997 19:32:31 -0700"
Message-ID: <kigwwkdeffb.fsf_-_@jagor.srce.hr>
Lines: 65
X-Mailer: Quassia Gnus v0.5/XEmacs 20.3(beta21) - "Bern"

SL Baur <steve@xemacs.org> writes:

> By the time Hrvoje is done, no package will insinuate itself upon load 
> unless specifically requested to.

Although this has been discussed before, I believe the beta community
deserves some more explanation on the background of this change.  For
some time there has been an unwritten rule that a package should not
change the state of Emacs upon loading.  This means that
(require 'foo) or (load "foo"), should not make XEmacs do anything
weird.  It should just load the functions, create the keymaps, etc.

Only when a mode function is invoked -- optimally the one that turns
it on, should the mode insinuate XEmacs fully.  This is especially
important with the advent of Customize, where the package must be
loaded for a person to be able to see its customization.  However,
seeing customizations does *not* mean a person wants to *use* the
package.


So, I am done with all the packages I know of.  If someone knows 
of other packages that change Emacs' behaviour radically just by
loading them -- (require 'foo) or (load "foo"), as oposed to `M-x foo'
or (foo) -- please let me know, so I can try fixing them.

jka-compr was easy, as I only had to remove the explicit call to
`jka-compr-install'.  For other, less worthy packages, the procedure
is this:

I move the top-level forms that change Emacs' behaviour while loading
the package `foo' to a `foo-insinuate' routine.  I also install a
`foo-insinuated' variable, and add the following check to the startup
code of `foo':

(defun foo ()
  .......
  (unless foo-insinuated
    (foo-insinuate)
    (setq foo-insinuated t)))

I suggest to package authors to make similar changes to their
packages, so they are easier to use and customize.  Stallman seems to
impose the same (logical) change to Emacs 20.  From FSFmacs NEWS:

    ** If you wish to use Show Paren mode to display matching parentheses,
    it is no longer sufficient to load paren.el.  Instead you must call
    show-paren-mode.

    ** If you wish to use Delete Selection mode to replace a highlighted
    selection when you insert new text, it is no longer sufficient to load
    delsel.el.  Instead you must call the function delete-selection-mode.

    ** If you wish to use Partial Completion mode to complete partial words
    within symbols or filenames, it is no longer sufficient to load
    complete.el.  Instead you must call the function partial-completion-mode.

    ** If you wish to use uniquify to rename buffers for you,
    it is no longer sufficient to load uniquify.el.  You must also
    set uniquify-buffer-name-style to one of the non-nil legitimate values.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Then...  his face does a complete change of expression.  It goes from
a "Vengeance is mine" expression, to a "What the fuck" blank look.

