Stephen J Turnbull <turnbull(a)sk.tsukuba.ac.jp> writes in xemacs-beta(a)xemacs.org:
>>>>> "Greg" == Greg Klanderman
<greg(a)klanderman.net> writes:
Greg> Can we add this to some appropriate
XEmacs package? The new
Greg> pcl-cvs maintainer has decided to use this package, which is
Greg> included in GNU Emacs, and I'd like to be able to upgrade
Greg> our pcl-cvs before too long.
The documentation and variable names are incredibly ugly though. I
don't see the point; it really isn't very hard to write a minor mode
in the first place.
There isn't too much of a point with a function like `add-minor-mode'.
Well, I guess that means it belongs in fsf-compat.
Yup, if we use it at all[1]. After a first reading, I don't
particularly care for having it as part of XEmacs.
Also putting all of the mode-switching functionality on hooks seems
like bad design to me; the user can mess with those (eg, setq'ing a
hook variable).
Do you mean the lack of the ability of the minor mode to run code of
its own in the canned toggle function?
And even `add-hook' has that `append' argument, which means
user
code could get run before or after the mode's own code.
Urk.
I'm more concerned about the ordering problem than with the user
doing setq on a hook. If the user wishes to `setq' a hook, he must
be prepared to accept the consequences of it. I notice though that
the hook variables are declared with `defvar' instead of `defcustom'.
Footnotes:
[1] Greg, this would mean you would need to rename the file
pcl-cvs-easy-mmode.el and put it in the pcl-cvs package, if it must be
used.