Subject: Unhelpful documentation for add-variable-watcher.
From: Alan Mackenzie <[email-masked]>
To: [email-masked]
Date: Thu, 14 Nov 2019 07:38:35 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello, Emacs.

The doc string for add-variable-watcher wrongly states:

    Cause WATCH-FUNCTION to be called when SYMBOL is set.

.  Correct would be either

    Cause WATCH-FUNCTION to be called just before SYMBOL is set.

or

    Cause WATCH-FUNCTION to be called just after SYMBOL is set.

.  I'm guessing that the first of these applies, but I shouldn't have to
guess.  The difference is whether one can get the old value from SYMBOL
or not.

The documentation in the Elisp manual is similarly ambiguous.  It uses
the conjunction "whenever".

-- 
Alan Mackenzie (Nuremberg, Germany).