aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
authorEli Zaretskii2019-11-15 11:16:09 +0200
committerEli Zaretskii2019-11-15 11:16:09 +0200
commit0114bb964afd81b6a6dc8c742bceba61d0f2a7dc (patch)
treea102633775df851f6d278102f86a6845c5d7f2d5 /src/data.c
parent3495cefcf67e508152097a53e6505f214e46fa9e (diff)
downloademacs-0114bb964afd81b6a6dc8c742bceba61d0f2a7dc.tar.gz
emacs-0114bb964afd81b6a6dc8c742bceba61d0f2a7dc.zip
Improve documentation of 'add-variable-watcher'
* doc/lispref/variables.texi (Watching Variables): Clarify the documentation of 'add-variable-watcher' and fix markup. * src/data.c (Fadd_variable_watcher): Clarify the doc string. (Bug#38205)
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/data.c b/src/data.c
index 9efcd72f93e..26e8611304b 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1472,11 +1472,12 @@ harmonize_variable_watchers (Lisp_Object alias, Lisp_Object base_variable)
1472 1472
1473DEFUN ("add-variable-watcher", Fadd_variable_watcher, Sadd_variable_watcher, 1473DEFUN ("add-variable-watcher", Fadd_variable_watcher, Sadd_variable_watcher,
1474 2, 2, 0, 1474 2, 2, 0,
1475 doc: /* Cause WATCH-FUNCTION to be called when SYMBOL is set. 1475 doc: /* Cause WATCH-FUNCTION to be called when SYMBOL is about to be set.
1476 1476
1477It will be called with 4 arguments: (SYMBOL NEWVAL OPERATION WHERE). 1477It will be called with 4 arguments: (SYMBOL NEWVAL OPERATION WHERE).
1478SYMBOL is the variable being changed. 1478SYMBOL is the variable being changed.
1479NEWVAL is the value it will be changed to. 1479NEWVAL is the value it will be changed to. (The variable still has
1480the old value when WATCH-FUNCTION is called.)
1480OPERATION is a symbol representing the kind of change, one of: `set', 1481OPERATION is a symbol representing the kind of change, one of: `set',
1481`let', `unlet', `makunbound', and `defvaralias'. 1482`let', `unlet', `makunbound', and `defvaralias'.
1482WHERE is a buffer if the buffer-local value of the variable is being 1483WHERE is a buffer if the buffer-local value of the variable is being