diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/eval.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 86011a234c0..5c7cb3196a6 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -623,6 +623,16 @@ The return value is BASE-VARIABLE. */) | |||
| 623 | if (NILP (Fboundp (base_variable))) | 623 | if (NILP (Fboundp (base_variable))) |
| 624 | set_internal (base_variable, find_symbol_value (new_alias), | 624 | set_internal (base_variable, find_symbol_value (new_alias), |
| 625 | Qnil, SET_INTERNAL_BIND); | 625 | Qnil, SET_INTERNAL_BIND); |
| 626 | else if (!NILP (Fboundp (new_alias)) | ||
| 627 | && !EQ (find_symbol_value (new_alias), | ||
| 628 | find_symbol_value (base_variable))) | ||
| 629 | call2 (intern ("display-warning"), | ||
| 630 | list3 (intern ("defvaralias"), intern ("losing-value"), new_alias), | ||
| 631 | CALLN (Fformat_message, | ||
| 632 | build_string | ||
| 633 | ("Overwriting value of `%s' by aliasing to `%s'"), | ||
| 634 | new_alias, base_variable)); | ||
| 635 | |||
| 626 | { | 636 | { |
| 627 | union specbinding *p; | 637 | union specbinding *p; |
| 628 | 638 | ||