diff options
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/data.c b/src/data.c index bd7d0bc4ac5..6fac1131eba 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -902,6 +902,19 @@ DEFUN ("set", Fset, Sset, 2, 2, 0, | |||
| 902 | (symbol, newval) | 902 | (symbol, newval) |
| 903 | register Lisp_Object symbol, newval; | 903 | register Lisp_Object symbol, newval; |
| 904 | { | 904 | { |
| 905 | return set_internal (symbol, newval, 0); | ||
| 906 | } | ||
| 907 | |||
| 908 | /* Stpre the value NEWVAL into SYMBOL. | ||
| 909 | If BINDFLAG is zero, then if this symbol is supposed to become | ||
| 910 | local in every buffer where it is set, then we make it local. | ||
| 911 | If BINDFLAG is nonzero, we don't do that. */ | ||
| 912 | |||
| 913 | Lisp_Object | ||
| 914 | set_internal (symbol, newval, bindflag) | ||
| 915 | register Lisp_Object symbol, newval; | ||
| 916 | int bindflag; | ||
| 917 | { | ||
| 905 | int voide = EQ (newval, Qunbound); | 918 | int voide = EQ (newval, Qunbound); |
| 906 | 919 | ||
| 907 | register Lisp_Object valcontents, tem1, current_alist_element; | 920 | register Lisp_Object valcontents, tem1, current_alist_element; |
| @@ -978,13 +991,14 @@ DEFUN ("set", Fset, Sset, 2, 2, 0, | |||
| 978 | /* This buffer still sees the default value. */ | 991 | /* This buffer still sees the default value. */ |
| 979 | 992 | ||
| 980 | /* If the variable is a Lisp_Some_Buffer_Local_Value, | 993 | /* If the variable is a Lisp_Some_Buffer_Local_Value, |
| 994 | or if this is `let' rather than `set', | ||
| 981 | make CURRENT-ALIST-ELEMENT point to itself, | 995 | make CURRENT-ALIST-ELEMENT point to itself, |
| 982 | indicating that we're seeing the default value. */ | 996 | indicating that we're seeing the default value. */ |
| 983 | if (SOME_BUFFER_LOCAL_VALUEP (valcontents)) | 997 | if (bindflag || SOME_BUFFER_LOCAL_VALUEP (valcontents)) |
| 984 | tem1 = XCONS (XBUFFER_LOCAL_VALUE (valcontents)->cdr)->cdr; | 998 | tem1 = XCONS (XBUFFER_LOCAL_VALUE (valcontents)->cdr)->cdr; |
| 985 | 999 | ||
| 986 | /* If it's a Lisp_Buffer_Local_Value, give this buffer a | 1000 | /* If it's a Lisp_Buffer_Local_Value, being set not bound, |
| 987 | new assoc for a local value and set | 1001 | give this buffer a new assoc for a local value and set |
| 988 | CURRENT-ALIST-ELEMENT to point to that. */ | 1002 | CURRENT-ALIST-ELEMENT to point to that. */ |
| 989 | else | 1003 | else |
| 990 | { | 1004 | { |