emacs-devel
[Top][All Lists]
Advanced

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

Re: Defcustom write-file-functions and write-contents-functions?


From: Luc Teirlinck
Subject: Re: Defcustom write-file-functions and write-contents-functions?
Date: Wed, 31 Dec 2003 10:57:13 -0600 (CST)

Do you really want to make those two functions customizable through
Custom?  They seem to be intended to be used by programs.  They are
tricky.  They are not normal hooks.  The order matters a lot.  If a
user naively adds a function that returns a non-nil value, big
surprises may result.  Not something one might want the average user
to start playing apprentice sorcerer with.  (_Any_ Lisp variable is
customizable by a sophisticated user by writing Lisp code in .emacs or
files loaded by .emacs.)  Custom sets _global_ values and these two
hooks are intended to be file-specific and hence buffer-local.

I do not know how you envision the average user to use these
defcustoms.  Would the customizability you want to achieve not be
better served by adding a defcustom for a new no-tricks _normal_ hook,
say `before_save_hook', called before the other two?  (If there
already would be a hook of this type, then it should be documented in
(elisp)Saving Buffers.)

Sincerely,

Luc.




reply via email to

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