Richard Stallman wrote:

   If we can't arrange to make just the defcustom do the job, documenting
   this method is ok with me.

   Perhaps we should document a simple way and a complex way.  The simple
   way is that it all gets done by the :set function when the defcustom's
   expansion is executed.  That requires putting the defcustom after the
   minor mode function and generating a defvar before the function.
   You'd use custom-initialize-reset.

   For cases which are more complex, you'd use custom-initialize-default
   and then write (if foo-mode (foo-mode 1)) at the end of the file.

If we are willing to change define-minor-mode, then I do not believe
that there is any need for the more complex method, unless there is
some reason why the define-minor-mode can not be delayed until all
functions called by the minor mode have been defined.

If we make define-minor-mode write a compiler defvar, then define the
mode function and then write the defcustom, one can use
custom-initialize-set if the define-minor-mode is not autoloaded, and
custom-initialize-reset if it is to be autoloaded.  Actually,
custom-initialize-reset is relatively harmless for the default
define-minor-mode :set function.  (The problems I was referring to
concern non minor mode :set functions, as I pointed out in my other
message.)

Sincerely,

Luc.



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to