[Top][All Lists]

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

Re: Coding Convections - Enabling a feature by loading a file

From: Lute Kamstra
Subject: Re: Coding Convections - Enabling a feature by loading a file
Date: Thu, 05 Jun 2003 18:24:38 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Peter S Galbraith <address@hidden> writes:


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

I'm not familiar with bar-cursor.el, but in general a library can
implement more than one feature.  In such a case, it is usually not
obvious which feature to turn on.  It is best to turn nothing on
automatically and let the user choose which of the features to use by
explicitly turning them on.  Even if a library contains only one
feature now, features might be added in future versions.  Such changes
won't surprise the user if nothing is turned on upon loading the

Furthermore, some other library could (require 'bar-cursor) to use
some function that is defined in bar-cursor.el.  In such a case, you
usually do not want bar-cursor-mode to be turned on.


(spook) => "unclassified Montenegro Serbian"
(insert-file-contents "~/.signature") => (error "`~/.signature' too rude")

reply via email to

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