help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Coding Convections - Enabling a feature by loading a file


From: Peter S Galbraith
Subject: Coding Convections - Enabling a feature by loading a file
Date: Wed, 04 Jun 2003 14:51:46 -0400

Hi all,

The coding conventions say:

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

The first part is fine (`include a command to enable and disable the
feature').  But what is the rationale behind the loading of a package
having no visisble effect?  If the only purpose of a package is to
enable a feature (say changing the cursor to a bar), why ask users to
do:

     (require 'bar-cursor)
     (bar-cursor-mode 1)

instead of only:

     (require 'bar-cursor)

?

I am perfect happy for packages to install themselves correctly once
loaded without having to go through more hoops.

Thanks,
Peter





reply via email to

[Prev in Thread] Current Thread [Next in Thread]