diff options
author | Dima Kogan <dima@secretsauce.net> | 2016-12-05 21:42:20 -0800 |
---|---|---|
committer | Dima Kogan <dima@secretsauce.net> | 2017-01-30 21:04:11 -0800 |
commit | f3c77d11af65f3b319b1784b4c3cf08c51aa7997 (patch) | |
tree | 5d2224f3846946129154ea45493d5650fd89edd2 /src/data.c | |
parent | 3c941b900007c9e79c00af0f21d88154f6d8af1a (diff) | |
download | emacs-f3c77d11af65f3b319b1784b4c3cf08c51aa7997.tar.gz |
stash
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/data.c b/src/data.c index 8e07bf01b44..26ff9948828 100644 --- a/src/data.c +++ b/src/data.c @@ -1304,6 +1304,56 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, default: emacs_abort (); } + + const char* symname = SDATA(sym->name); + + if( EQ(Vwatch_object, symbol) ) + { + static int nest_level = 0; + if(nest_level++ == 0) + { + switch(sym->redirect) + { + case SYMBOL_PLAINVAL: + { + AUTO_STRING (format, "Setting symbol '%s'; redirect: SYMBOL_PLAINVAL"); + CALLN (Fmessage, format, SYMBOL_NAME (symbol)); + break; + } + case SYMBOL_VARALIAS: + { + AUTO_STRING (format, "Setting symbol '%s'; redirect: SYMBOL_VARALIAS"); + CALLN (Fmessage, format, SYMBOL_NAME (symbol)); + break; + } + case SYMBOL_LOCALIZED: + { + AUTO_STRING (format, "Setting symbol '%s'; redirect: SYMBOL_LOCALIZED"); + CALLN (Fmessage, format, SYMBOL_NAME (symbol)); + break; + } + case SYMBOL_FORWARDED: + { + AUTO_STRING (format, "Setting symbol '%s'; redirect: SYMBOL_FORWARDED"); + CALLN (Fmessage, format, SYMBOL_NAME (symbol)); + break; + } + + default: + { + AUTO_STRING (format, "Setting symbol '%s'; redirect: UNKNOWN"); + CALLN (Fmessage, format, SYMBOL_NAME (symbol)); + break; + } + } + } + nest_level--; + } + + + + + start: switch (sym->redirect) { |