[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ls-lisp patch
From: |
Markus Rost |
Subject: |
Re: ls-lisp patch |
Date: |
Wed, 15 Jan 2003 10:15:14 -0500 (EST) |
> Date: Tue, 14 Jan 2003 17:42:08 -0500 (EST)
> From: Markus Rost <address@hidden>
>
> If you load ls-lisp.el for some reason, for instance with
>
> M-x customize-group ls-lisp
>
> then the function insert-directory gets redefined.
Sorry, I don't understand: isn't the fact that you customize the
ls-lisp group mean that you _want_ to use ls-lisp?
No, why? If one does not know a package, one of the things one might
do is to look at its main options, using customize-group. Or one
might play around, call M-x customize, and then follow through the
group hierarchy, which will usually load the corresponding libraries.
In any case, I think that just loading a library should not modify the
behavior of Emacs. Am I wrong here?
Ah, here I found something related in the manual:
(Info-goto-node "(elisp)Coding Conventions")
* When a package provides a modification of ordinary Emacs
behavior, it is good to include a command to enable and disable
the feature, provide a command named `WHATEVER-mode' which turns
the feature on or off, and make it autoload (see *note Autoload::).
Design the package so that simply loading it has no visible
effect--that should not enable the feature.(2) Users will request
the feature by invoking the command.
(2) Consider that the package may be loaded arbitrarily by Custom
for instance.
==
I think that now almost all libraries follow this convention. This
wasn't the case in Emacs 20. Before loading a library one always had
to study first what it was exactly invoking. It is much more
convenient if you can just load a library and then examine what it
offers, at least in principle.
Of course for ls-lisp the situation is a bit more complicated, since
the default behaviour depends on the system.