From: Peter S Galbraith <psg@debian.org>
Subject: Coding Convections - Enabling a feature by loading a file
Date: Wed, 04 Jun 2003 14:51:46 -0400 [thread overview]
Message-ID: <20030604185146.57D492951F@mixing.qc.dfo.ca> (raw)
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
next reply other threads:[~2003-06-04 18:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-04 18:51 Peter S Galbraith [this message]
[not found] <mailman.7309.1054754086.21513.help-gnu-emacs@gnu.org>
2003-06-04 21:13 ` Coding Convections - Enabling a feature by loading a file Stefan Monnier
[not found] ` <monnier+gnu.emacs.help/news/@flint.cs.yale.edu>
2003-06-05 0:47 ` Peter S Galbraith
[not found] ` <mailman.7337.1054774167.21513.help-gnu-emacs@gnu.org>
2003-06-05 1:02 ` Stefan Monnier
2003-06-05 16:24 ` Lute Kamstra
[not found] ` <Lute.Kamstra@cwi.nl>
2003-06-08 0:58 ` Peter S Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030604185146.57D492951F@mixing.qc.dfo.ca \
--to=psg@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.