diff options
| author | Eli Zaretskii | 2019-11-15 11:16:09 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-11-15 11:16:09 +0200 |
| commit | 0114bb964afd81b6a6dc8c742bceba61d0f2a7dc (patch) | |
| tree | a102633775df851f6d278102f86a6845c5d7f2d5 /src/data.c | |
| parent | 3495cefcf67e508152097a53e6505f214e46fa9e (diff) | |
| download | emacs-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.c | 5 |
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 | ||
| 1473 | DEFUN ("add-variable-watcher", Fadd_variable_watcher, Sadd_variable_watcher, | 1473 | DEFUN ("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 | ||
| 1477 | It will be called with 4 arguments: (SYMBOL NEWVAL OPERATION WHERE). | 1477 | It will be called with 4 arguments: (SYMBOL NEWVAL OPERATION WHERE). |
| 1478 | SYMBOL is the variable being changed. | 1478 | SYMBOL is the variable being changed. |
| 1479 | NEWVAL is the value it will be changed to. | 1479 | NEWVAL is the value it will be changed to. (The variable still has |
| 1480 | the old value when WATCH-FUNCTION is called.) | ||
| 1480 | OPERATION is a symbol representing the kind of change, one of: `set', | 1481 | OPERATION is a symbol representing the kind of change, one of: `set', |
| 1481 | `let', `unlet', `makunbound', and `defvaralias'. | 1482 | `let', `unlet', `makunbound', and `defvaralias'. |
| 1482 | WHERE is a buffer if the buffer-local value of the variable is being | 1483 | WHERE is a buffer if the buffer-local value of the variable is being |