diff options
| author | Stefan Monnier | 2016-12-21 15:07:43 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2016-12-21 15:07:43 -0500 |
| commit | a6063ffe5ae395655cb55ba5823c83e306b3161b (patch) | |
| tree | ab44b1db51c5ae4e5ff65533b9eeba79de954460 /src | |
| parent | cf6ce9a1fe320ebe5b238af5f7af9416ac954855 (diff) | |
| download | emacs-a6063ffe5ae395655cb55ba5823c83e306b3161b.tar.gz emacs-a6063ffe5ae395655cb55ba5823c83e306b3161b.zip | |
* src/data.c (Fmake_variable_frame_local): Remove
* src/lisp.h (struct Lisp_Buffer_Local_Value): Remove `frame_local'.
* src/data.c (swap_in_symval_forwarding, set_internal)
(set_symbol_trapped_write, make_blv, Fmake_variable_buffer_local)
(Fmake_local_variable, Fkill_local_variable, Flocal_variable_p):
Don't pay attention to ->frame_local any more.
(syms_of_data): Remove Qtrapping_frame_local and don't defsubr
Smake_variable_frame_local.
* etc/NEWS (Incompatible Lisp Changes in Emacs 26.1): Announce removal
of make-variable-frame-local.
* lisp/help-fns.el (describe-variable): Don't handle the now impossible
frame-local case.
* lisp/subr.el (make-variable-frame-local): Remove obsolescence data.
* src/frame.c (store_frame_param):
* src/eval.c (specbind): Don't pay attention to ->frame_local any more.
* src/widget.c (first_frame_p): Remove, unused.
Diffstat (limited to 'src')
| -rw-r--r-- | src/data.c | 133 | ||||
| -rw-r--r-- | src/eval.c | 2 | ||||
| -rw-r--r-- | src/frame.c | 30 | ||||
| -rw-r--r-- | src/lisp.h | 7 | ||||
| -rw-r--r-- | src/widget.c | 10 |
5 files changed, 12 insertions, 170 deletions
diff --git a/src/data.c b/src/data.c index 6dd346bf8df..821fc379374 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -1176,9 +1176,7 @@ swap_in_symval_forwarding (struct Lisp_Symbol *symbol, struct Lisp_Buffer_Local_ | |||
| 1176 | tem1 = blv->where; | 1176 | tem1 = blv->where; |
| 1177 | 1177 | ||
| 1178 | if (NILP (tem1) | 1178 | if (NILP (tem1) |
| 1179 | || (blv->frame_local | 1179 | || current_buffer != XBUFFER (tem1)) |
| 1180 | ? !EQ (selected_frame, tem1) | ||
| 1181 | : current_buffer != XBUFFER (tem1))) | ||
| 1182 | { | 1180 | { |
| 1183 | 1181 | ||
| 1184 | /* Unload the previously loaded binding. */ | 1182 | /* Unload the previously loaded binding. */ |
| @@ -1189,16 +1187,8 @@ swap_in_symval_forwarding (struct Lisp_Symbol *symbol, struct Lisp_Buffer_Local_ | |||
| 1189 | { | 1187 | { |
| 1190 | Lisp_Object var; | 1188 | Lisp_Object var; |
| 1191 | XSETSYMBOL (var, symbol); | 1189 | XSETSYMBOL (var, symbol); |
| 1192 | if (blv->frame_local) | 1190 | tem1 = assq_no_quit (var, BVAR (current_buffer, local_var_alist)); |
| 1193 | { | 1191 | set_blv_where (blv, Fcurrent_buffer ()); |
| 1194 | tem1 = assq_no_quit (var, XFRAME (selected_frame)->param_alist); | ||
| 1195 | set_blv_where (blv, selected_frame); | ||
| 1196 | } | ||
| 1197 | else | ||
| 1198 | { | ||
| 1199 | tem1 = assq_no_quit (var, BVAR (current_buffer, local_var_alist)); | ||
| 1200 | set_blv_where (blv, Fcurrent_buffer ()); | ||
| 1201 | } | ||
| 1202 | } | 1192 | } |
| 1203 | if (!(blv->found = !NILP (tem1))) | 1193 | if (!(blv->found = !NILP (tem1))) |
| 1204 | tem1 = blv->defcell; | 1194 | tem1 = blv->defcell; |
| @@ -1266,7 +1256,7 @@ DEFUN ("set", Fset, Sset, 2, 2, 0, | |||
| 1266 | } | 1256 | } |
| 1267 | 1257 | ||
| 1268 | /* Store the value NEWVAL into SYMBOL. | 1258 | /* Store the value NEWVAL into SYMBOL. |
| 1269 | If buffer/frame-locality is an issue, WHERE specifies which context to use. | 1259 | If buffer-locality is an issue, WHERE specifies which context to use. |
| 1270 | (nil stands for the current buffer/frame). | 1260 | (nil stands for the current buffer/frame). |
| 1271 | 1261 | ||
| 1272 | If BINDFLAG is SET_INTERNAL_SET, then if this symbol is supposed to | 1262 | If BINDFLAG is SET_INTERNAL_SET, then if this symbol is supposed to |
| @@ -1322,15 +1312,10 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, | |||
| 1322 | { | 1312 | { |
| 1323 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym); | 1313 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym); |
| 1324 | if (NILP (where)) | 1314 | if (NILP (where)) |
| 1325 | { | 1315 | XSETBUFFER (where, current_buffer); |
| 1326 | if (blv->frame_local) | 1316 | |
| 1327 | where = selected_frame; | ||
| 1328 | else | ||
| 1329 | XSETBUFFER (where, current_buffer); | ||
| 1330 | } | ||
| 1331 | /* If the current buffer is not the buffer whose binding is | 1317 | /* If the current buffer is not the buffer whose binding is |
| 1332 | loaded, or if there may be frame-local bindings and the frame | 1318 | loaded, or if it's a Lisp_Buffer_Local_Value and |
| 1333 | isn't the right one, or if it's a Lisp_Buffer_Local_Value and | ||
| 1334 | the default binding is loaded, the loaded binding may be the | 1319 | the default binding is loaded, the loaded binding may be the |
| 1335 | wrong one. */ | 1320 | wrong one. */ |
| 1336 | if (!EQ (blv->where, where) | 1321 | if (!EQ (blv->where, where) |
| @@ -1347,9 +1332,7 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, | |||
| 1347 | /* Find the new binding. */ | 1332 | /* Find the new binding. */ |
| 1348 | XSETSYMBOL (symbol, sym); /* May have changed via aliasing. */ | 1333 | XSETSYMBOL (symbol, sym); /* May have changed via aliasing. */ |
| 1349 | tem1 = assq_no_quit (symbol, | 1334 | tem1 = assq_no_quit (symbol, |
| 1350 | (blv->frame_local | 1335 | BVAR (XBUFFER (where), local_var_alist)); |
| 1351 | ? XFRAME (where)->param_alist | ||
| 1352 | : BVAR (XBUFFER (where), local_var_alist))); | ||
| 1353 | set_blv_where (blv, where); | 1336 | set_blv_where (blv, where); |
| 1354 | blv->found = 1; | 1337 | blv->found = 1; |
| 1355 | 1338 | ||
| @@ -1376,9 +1359,6 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, | |||
| 1376 | and load that binding. */ | 1359 | and load that binding. */ |
| 1377 | else | 1360 | else |
| 1378 | { | 1361 | { |
| 1379 | /* local_if_set is only supported for buffer-local | ||
| 1380 | bindings, not for frame-local bindings. */ | ||
| 1381 | eassert (!blv->frame_local); | ||
| 1382 | tem1 = Fcons (symbol, XCDR (blv->defcell)); | 1362 | tem1 = Fcons (symbol, XCDR (blv->defcell)); |
| 1383 | bset_local_var_alist | 1363 | bset_local_var_alist |
| 1384 | (XBUFFER (where), | 1364 | (XBUFFER (where), |
| @@ -1442,9 +1422,6 @@ set_symbol_trapped_write (Lisp_Object symbol, enum symbol_trapped_write trap) | |||
| 1442 | struct Lisp_Symbol* sym = XSYMBOL (symbol); | 1422 | struct Lisp_Symbol* sym = XSYMBOL (symbol); |
| 1443 | if (sym->trapped_write == SYMBOL_NOWRITE) | 1423 | if (sym->trapped_write == SYMBOL_NOWRITE) |
| 1444 | xsignal1 (Qtrapping_constant, symbol); | 1424 | xsignal1 (Qtrapping_constant, symbol); |
| 1445 | else if (sym->redirect == SYMBOL_LOCALIZED | ||
| 1446 | && SYMBOL_BLV (sym)->frame_local) | ||
| 1447 | xsignal1 (Qtrapping_frame_local, symbol); | ||
| 1448 | sym->trapped_write = trap; | 1425 | sym->trapped_write = trap; |
| 1449 | } | 1426 | } |
| 1450 | 1427 | ||
| @@ -1784,7 +1761,6 @@ make_blv (struct Lisp_Symbol *sym, bool forwarded, | |||
| 1784 | eassert (!(forwarded && KBOARD_OBJFWDP (valcontents.fwd))); | 1761 | eassert (!(forwarded && KBOARD_OBJFWDP (valcontents.fwd))); |
| 1785 | blv->fwd = forwarded ? valcontents.fwd : NULL; | 1762 | blv->fwd = forwarded ? valcontents.fwd : NULL; |
| 1786 | set_blv_where (blv, Qnil); | 1763 | set_blv_where (blv, Qnil); |
| 1787 | blv->frame_local = 0; | ||
| 1788 | blv->local_if_set = 0; | 1764 | blv->local_if_set = 0; |
| 1789 | set_blv_defcell (blv, tem); | 1765 | set_blv_defcell (blv, tem); |
| 1790 | set_blv_valcell (blv, tem); | 1766 | set_blv_valcell (blv, tem); |
| @@ -1831,9 +1807,6 @@ The function `default-value' gets the default value and `set-default' sets it. | |||
| 1831 | break; | 1807 | break; |
| 1832 | case SYMBOL_LOCALIZED: | 1808 | case SYMBOL_LOCALIZED: |
| 1833 | blv = SYMBOL_BLV (sym); | 1809 | blv = SYMBOL_BLV (sym); |
| 1834 | if (blv->frame_local) | ||
| 1835 | error ("Symbol %s may not be buffer-local", | ||
| 1836 | SDATA (SYMBOL_NAME (variable))); | ||
| 1837 | break; | 1810 | break; |
| 1838 | case SYMBOL_FORWARDED: | 1811 | case SYMBOL_FORWARDED: |
| 1839 | forwarded = 1; valcontents.fwd = SYMBOL_FWD (sym); | 1812 | forwarded = 1; valcontents.fwd = SYMBOL_FWD (sym); |
| @@ -1908,9 +1881,6 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) | |||
| 1908 | forwarded = 0; valcontents.value = SYMBOL_VAL (sym); break; | 1881 | forwarded = 0; valcontents.value = SYMBOL_VAL (sym); break; |
| 1909 | case SYMBOL_LOCALIZED: | 1882 | case SYMBOL_LOCALIZED: |
| 1910 | blv = SYMBOL_BLV (sym); | 1883 | blv = SYMBOL_BLV (sym); |
| 1911 | if (blv->frame_local) | ||
| 1912 | error ("Symbol %s may not be buffer-local", | ||
| 1913 | SDATA (SYMBOL_NAME (variable))); | ||
| 1914 | break; | 1884 | break; |
| 1915 | case SYMBOL_FORWARDED: | 1885 | case SYMBOL_FORWARDED: |
| 1916 | forwarded = 1; valcontents.fwd = SYMBOL_FWD (sym); | 1886 | forwarded = 1; valcontents.fwd = SYMBOL_FWD (sym); |
| @@ -2027,8 +1997,6 @@ From now on the default value will apply in this buffer. Return VARIABLE. */) | |||
| 2027 | } | 1997 | } |
| 2028 | case SYMBOL_LOCALIZED: | 1998 | case SYMBOL_LOCALIZED: |
| 2029 | blv = SYMBOL_BLV (sym); | 1999 | blv = SYMBOL_BLV (sym); |
| 2030 | if (blv->frame_local) | ||
| 2031 | return variable; | ||
| 2032 | break; | 2000 | break; |
| 2033 | default: emacs_abort (); | 2001 | default: emacs_abort (); |
| 2034 | } | 2002 | } |
| @@ -2062,81 +2030,6 @@ From now on the default value will apply in this buffer. Return VARIABLE. */) | |||
| 2062 | 2030 | ||
| 2063 | /* Lisp functions for creating and removing buffer-local variables. */ | 2031 | /* Lisp functions for creating and removing buffer-local variables. */ |
| 2064 | 2032 | ||
| 2065 | /* Obsolete since 22.2. NB adjust doc of modify-frame-parameters | ||
| 2066 | when/if this is removed. */ | ||
| 2067 | |||
| 2068 | DEFUN ("make-variable-frame-local", Fmake_variable_frame_local, Smake_variable_frame_local, | ||
| 2069 | 1, 1, "vMake Variable Frame Local: ", | ||
| 2070 | doc: /* Enable VARIABLE to have frame-local bindings. | ||
| 2071 | This does not create any frame-local bindings for VARIABLE, | ||
| 2072 | it just makes them possible. | ||
| 2073 | |||
| 2074 | A frame-local binding is actually a frame parameter value. | ||
| 2075 | If a frame F has a value for the frame parameter named VARIABLE, | ||
| 2076 | that also acts as a frame-local binding for VARIABLE in F-- | ||
| 2077 | provided this function has been called to enable VARIABLE | ||
| 2078 | to have frame-local bindings at all. | ||
| 2079 | |||
| 2080 | The only way to create a frame-local binding for VARIABLE in a frame | ||
| 2081 | is to set the VARIABLE frame parameter of that frame. See | ||
| 2082 | `modify-frame-parameters' for how to set frame parameters. | ||
| 2083 | |||
| 2084 | Note that since Emacs 23.1, variables cannot be both buffer-local and | ||
| 2085 | frame-local any more (buffer-local bindings used to take precedence over | ||
| 2086 | frame-local bindings). */) | ||
| 2087 | (Lisp_Object variable) | ||
| 2088 | { | ||
| 2089 | bool forwarded; | ||
| 2090 | union Lisp_Val_Fwd valcontents; | ||
| 2091 | struct Lisp_Symbol *sym; | ||
| 2092 | struct Lisp_Buffer_Local_Value *blv = NULL; | ||
| 2093 | |||
| 2094 | CHECK_SYMBOL (variable); | ||
| 2095 | sym = XSYMBOL (variable); | ||
| 2096 | |||
| 2097 | start: | ||
| 2098 | switch (sym->redirect) | ||
| 2099 | { | ||
| 2100 | case SYMBOL_VARALIAS: sym = indirect_variable (sym); goto start; | ||
| 2101 | case SYMBOL_PLAINVAL: | ||
| 2102 | forwarded = 0; valcontents.value = SYMBOL_VAL (sym); | ||
| 2103 | if (EQ (valcontents.value, Qunbound)) | ||
| 2104 | valcontents.value = Qnil; | ||
| 2105 | break; | ||
| 2106 | case SYMBOL_LOCALIZED: | ||
| 2107 | if (SYMBOL_BLV (sym)->frame_local) | ||
| 2108 | return variable; | ||
| 2109 | else | ||
| 2110 | error ("Symbol %s may not be frame-local", | ||
| 2111 | SDATA (SYMBOL_NAME (variable))); | ||
| 2112 | case SYMBOL_FORWARDED: | ||
| 2113 | forwarded = 1; valcontents.fwd = SYMBOL_FWD (sym); | ||
| 2114 | if (KBOARD_OBJFWDP (valcontents.fwd) || BUFFER_OBJFWDP (valcontents.fwd)) | ||
| 2115 | error ("Symbol %s may not be frame-local", | ||
| 2116 | SDATA (SYMBOL_NAME (variable))); | ||
| 2117 | break; | ||
| 2118 | default: emacs_abort (); | ||
| 2119 | } | ||
| 2120 | |||
| 2121 | if (SYMBOL_TRAPPED_WRITE_P (variable)) | ||
| 2122 | error ("Symbol %s may not be frame-local", SDATA (SYMBOL_NAME (variable))); | ||
| 2123 | |||
| 2124 | blv = make_blv (sym, forwarded, valcontents); | ||
| 2125 | blv->frame_local = 1; | ||
| 2126 | sym->redirect = SYMBOL_LOCALIZED; | ||
| 2127 | SET_SYMBOL_BLV (sym, blv); | ||
| 2128 | { | ||
| 2129 | Lisp_Object symbol; | ||
| 2130 | XSETSYMBOL (symbol, sym); /* In case `variable' is aliased. */ | ||
| 2131 | if (let_shadows_global_binding_p (symbol)) | ||
| 2132 | { | ||
| 2133 | AUTO_STRING (format, "Making %s frame-local while let-bound!"); | ||
| 2134 | CALLN (Fmessage, format, SYMBOL_NAME (variable)); | ||
| 2135 | } | ||
| 2136 | } | ||
| 2137 | return variable; | ||
| 2138 | } | ||
| 2139 | |||
| 2140 | DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p, | 2033 | DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p, |
| 2141 | 1, 2, 0, | 2034 | 1, 2, 0, |
| 2142 | doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER. | 2035 | doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER. |
| @@ -2168,10 +2061,7 @@ BUFFER defaults to the current buffer. */) | |||
| 2168 | { | 2061 | { |
| 2169 | elt = XCAR (tail); | 2062 | elt = XCAR (tail); |
| 2170 | if (EQ (variable, XCAR (elt))) | 2063 | if (EQ (variable, XCAR (elt))) |
| 2171 | { | 2064 | return Qt; |
| 2172 | eassert (!blv->frame_local); | ||
| 2173 | return Qt; | ||
| 2174 | } | ||
| 2175 | } | 2065 | } |
| 2176 | return Qnil; | 2066 | return Qnil; |
| 2177 | } | 2067 | } |
| @@ -2230,7 +2120,6 @@ DEFUN ("variable-binding-locus", Fvariable_binding_locus, Svariable_binding_locu | |||
| 2230 | 1, 1, 0, | 2120 | 1, 1, 0, |
| 2231 | doc: /* Return a value indicating where VARIABLE's current binding comes from. | 2121 | doc: /* Return a value indicating where VARIABLE's current binding comes from. |
| 2232 | If the current binding is buffer-local, the value is the current buffer. | 2122 | If the current binding is buffer-local, the value is the current buffer. |
| 2233 | If the current binding is frame-local, the value is the selected frame. | ||
| 2234 | If the current binding is global (the default), the value is nil. */) | 2123 | If the current binding is global (the default), the value is nil. */) |
| 2235 | (register Lisp_Object variable) | 2124 | (register Lisp_Object variable) |
| 2236 | { | 2125 | { |
| @@ -3664,7 +3553,6 @@ syms_of_data (void) | |||
| 3664 | DEFSYM (Qvoid_variable, "void-variable"); | 3553 | DEFSYM (Qvoid_variable, "void-variable"); |
| 3665 | DEFSYM (Qsetting_constant, "setting-constant"); | 3554 | DEFSYM (Qsetting_constant, "setting-constant"); |
| 3666 | DEFSYM (Qtrapping_constant, "trapping-constant"); | 3555 | DEFSYM (Qtrapping_constant, "trapping-constant"); |
| 3667 | DEFSYM (Qtrapping_frame_local, "trapping-frame-local"); | ||
| 3668 | DEFSYM (Qinvalid_read_syntax, "invalid-read-syntax"); | 3556 | DEFSYM (Qinvalid_read_syntax, "invalid-read-syntax"); |
| 3669 | 3557 | ||
| 3670 | DEFSYM (Qinvalid_function, "invalid-function"); | 3558 | DEFSYM (Qinvalid_function, "invalid-function"); |
| @@ -3745,8 +3633,6 @@ syms_of_data (void) | |||
| 3745 | "Attempt to set a constant symbol"); | 3633 | "Attempt to set a constant symbol"); |
| 3746 | PUT_ERROR (Qtrapping_constant, error_tail, | 3634 | PUT_ERROR (Qtrapping_constant, error_tail, |
| 3747 | "Attempt to trap writes to a constant symbol"); | 3635 | "Attempt to trap writes to a constant symbol"); |
| 3748 | PUT_ERROR (Qtrapping_frame_local, error_tail, | ||
| 3749 | "Attempt to trap writes to a frame local variable"); | ||
| 3750 | PUT_ERROR (Qinvalid_read_syntax, error_tail, "Invalid read syntax"); | 3636 | PUT_ERROR (Qinvalid_read_syntax, error_tail, "Invalid read syntax"); |
| 3751 | PUT_ERROR (Qinvalid_function, error_tail, "Invalid function"); | 3637 | PUT_ERROR (Qinvalid_function, error_tail, "Invalid function"); |
| 3752 | PUT_ERROR (Qwrong_number_of_arguments, error_tail, | 3638 | PUT_ERROR (Qwrong_number_of_arguments, error_tail, |
| @@ -3876,7 +3762,6 @@ syms_of_data (void) | |||
| 3876 | defsubr (&Smake_variable_buffer_local); | 3762 | defsubr (&Smake_variable_buffer_local); |
| 3877 | defsubr (&Smake_local_variable); | 3763 | defsubr (&Smake_local_variable); |
| 3878 | defsubr (&Skill_local_variable); | 3764 | defsubr (&Skill_local_variable); |
| 3879 | defsubr (&Smake_variable_frame_local); | ||
| 3880 | defsubr (&Slocal_variable_p); | 3765 | defsubr (&Slocal_variable_p); |
| 3881 | defsubr (&Slocal_variable_if_set_p); | 3766 | defsubr (&Slocal_variable_if_set_p); |
| 3882 | defsubr (&Svariable_binding_locus); | 3767 | defsubr (&Svariable_binding_locus); |
diff --git a/src/eval.c b/src/eval.c index 1d397303393..1313093a533 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -3283,8 +3283,6 @@ specbind (Lisp_Object symbol, Lisp_Object value) | |||
| 3283 | do_specbind (sym, specpdl_ptr - 1, value, SET_INTERNAL_BIND); | 3283 | do_specbind (sym, specpdl_ptr - 1, value, SET_INTERNAL_BIND); |
| 3284 | break; | 3284 | break; |
| 3285 | case SYMBOL_LOCALIZED: | 3285 | case SYMBOL_LOCALIZED: |
| 3286 | if (SYMBOL_BLV (sym)->frame_local) | ||
| 3287 | error ("Frame-local vars cannot be let-bound"); | ||
| 3288 | case SYMBOL_FORWARDED: | 3286 | case SYMBOL_FORWARDED: |
| 3289 | { | 3287 | { |
| 3290 | Lisp_Object ovalue = find_symbol_value (symbol); | 3288 | Lisp_Object ovalue = find_symbol_value (symbol); |
diff --git a/src/frame.c b/src/frame.c index b1d89f396ec..652d58440fa 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -2478,28 +2478,6 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val) | |||
| 2478 | return; | 2478 | return; |
| 2479 | } | 2479 | } |
| 2480 | 2480 | ||
| 2481 | /* If PROP is a symbol which is supposed to have frame-local values, | ||
| 2482 | and it is set up based on this frame, switch to the global | ||
| 2483 | binding. That way, we can create or alter the frame-local binding | ||
| 2484 | without messing up the symbol's status. */ | ||
| 2485 | if (SYMBOLP (prop)) | ||
| 2486 | { | ||
| 2487 | struct Lisp_Symbol *sym = XSYMBOL (prop); | ||
| 2488 | start: | ||
| 2489 | switch (sym->redirect) | ||
| 2490 | { | ||
| 2491 | case SYMBOL_VARALIAS: sym = indirect_variable (sym); goto start; | ||
| 2492 | case SYMBOL_PLAINVAL: case SYMBOL_FORWARDED: break; | ||
| 2493 | case SYMBOL_LOCALIZED: | ||
| 2494 | { struct Lisp_Buffer_Local_Value *blv = sym->val.blv; | ||
| 2495 | if (blv->frame_local && blv_found (blv) && XFRAME (blv->where) == f) | ||
| 2496 | swap_in_global_binding (sym); | ||
| 2497 | break; | ||
| 2498 | } | ||
| 2499 | default: emacs_abort (); | ||
| 2500 | } | ||
| 2501 | } | ||
| 2502 | |||
| 2503 | /* The tty color needed to be set before the frame's parameter | 2481 | /* The tty color needed to be set before the frame's parameter |
| 2504 | alist was updated with the new value. This is not true any more, | 2482 | alist was updated with the new value. This is not true any more, |
| 2505 | but we still do this test early on. */ | 2483 | but we still do this test early on. */ |
| @@ -2709,13 +2687,7 @@ The meaningful parameters are acted upon, i.e. the frame is changed | |||
| 2709 | according to their new values, and are also stored in the frame's | 2687 | according to their new values, and are also stored in the frame's |
| 2710 | parameter list so that `frame-parameters' will return them. | 2688 | parameter list so that `frame-parameters' will return them. |
| 2711 | PARMs that are not meaningful are still stored in the frame's parameter | 2689 | PARMs that are not meaningful are still stored in the frame's parameter |
| 2712 | list, but are otherwise ignored. | 2690 | list, but are otherwise ignored. */) |
| 2713 | |||
| 2714 | The value of frame parameter FOO can also be accessed | ||
| 2715 | as a frame-local binding for the variable FOO, if you have | ||
| 2716 | enabled such bindings for that variable with `make-variable-frame-local'. | ||
| 2717 | Note that this functionality is obsolete as of Emacs 22.2, and its | ||
| 2718 | use is not recommended. Explicitly check for a frame-parameter instead. */) | ||
| 2719 | (Lisp_Object frame, Lisp_Object alist) | 2691 | (Lisp_Object frame, Lisp_Object alist) |
| 2720 | { | 2692 | { |
| 2721 | struct frame *f = decode_live_frame (frame); | 2693 | struct frame *f = decode_live_frame (frame); |
diff --git a/src/lisp.h b/src/lisp.h index 66e9bd56412..061cf179f96 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2466,7 +2466,7 @@ struct Lisp_Buffer_Objfwd | |||
| 2466 | }; | 2466 | }; |
| 2467 | 2467 | ||
| 2468 | /* struct Lisp_Buffer_Local_Value is used in a symbol value cell when | 2468 | /* struct Lisp_Buffer_Local_Value is used in a symbol value cell when |
| 2469 | the symbol has buffer-local or frame-local bindings. (Exception: | 2469 | the symbol has buffer-local bindings. (Exception: |
| 2470 | some buffer-local variables are built-in, with their values stored | 2470 | some buffer-local variables are built-in, with their values stored |
| 2471 | in the buffer structure itself. They are handled differently, | 2471 | in the buffer structure itself. They are handled differently, |
| 2472 | using struct Lisp_Buffer_Objfwd.) | 2472 | using struct Lisp_Buffer_Objfwd.) |
| @@ -2494,9 +2494,6 @@ struct Lisp_Buffer_Local_Value | |||
| 2494 | /* True means that merely setting the variable creates a local | 2494 | /* True means that merely setting the variable creates a local |
| 2495 | binding for the current buffer. */ | 2495 | binding for the current buffer. */ |
| 2496 | bool_bf local_if_set : 1; | 2496 | bool_bf local_if_set : 1; |
| 2497 | /* True means this variable can have frame-local bindings, otherwise, it is | ||
| 2498 | can have buffer-local bindings. The two cannot be combined. */ | ||
| 2499 | bool_bf frame_local : 1; | ||
| 2500 | /* True means that the binding now loaded was found. | 2497 | /* True means that the binding now loaded was found. |
| 2501 | Presumably equivalent to (defcell!=valcell). */ | 2498 | Presumably equivalent to (defcell!=valcell). */ |
| 2502 | bool_bf found : 1; | 2499 | bool_bf found : 1; |
| @@ -3384,7 +3381,7 @@ make_symbol_constant (Lisp_Object sym) | |||
| 3384 | XSYMBOL (sym)->trapped_write = SYMBOL_NOWRITE; | 3381 | XSYMBOL (sym)->trapped_write = SYMBOL_NOWRITE; |
| 3385 | } | 3382 | } |
| 3386 | 3383 | ||
| 3387 | /* Buffer-local (also frame-local) variable access functions. */ | 3384 | /* Buffer-local variable access functions. */ |
| 3388 | 3385 | ||
| 3389 | INLINE int | 3386 | INLINE int |
| 3390 | blv_found (struct Lisp_Buffer_Local_Value *blv) | 3387 | blv_found (struct Lisp_Buffer_Local_Value *blv) |
diff --git a/src/widget.c b/src/widget.c index 59ed431e23b..97b4196f682 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -212,16 +212,6 @@ mark_shell_size_user_specified (Widget wmshell) | |||
| 212 | #endif | 212 | #endif |
| 213 | 213 | ||
| 214 | 214 | ||
| 215 | /* Can't have static frame locals because of some broken compilers. | ||
| 216 | Normally, initializing a variable like this doesn't work in emacs, | ||
| 217 | but it's ok in this file because it must come after lastfile (and | ||
| 218 | thus have its data not go into text space) because Xt needs to | ||
| 219 | write to initialized data objects too. | ||
| 220 | */ | ||
| 221 | #if 0 | ||
| 222 | static Boolean first_frame_p = True; | ||
| 223 | #endif | ||
| 224 | |||
| 225 | static void | 215 | static void |
| 226 | set_frame_size (EmacsFrame ew) | 216 | set_frame_size (EmacsFrame ew) |
| 227 | { | 217 | { |