diff options
| -rw-r--r-- | etc/NEWS | 1 | ||||
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/eval.c | 32 |
3 files changed, 33 insertions, 11 deletions
| @@ -221,6 +221,7 @@ Secret Service API requires D-Bus for communication. | |||
| 221 | 221 | ||
| 222 | * Lisp changes in Emacs 24.1 | 222 | * Lisp changes in Emacs 24.1 |
| 223 | 223 | ||
| 224 | ** frame-local variables cannot be let-bound any more. | ||
| 224 | ** prog-mode is a new major-mode meant to be the parent of programming mode. | 225 | ** prog-mode is a new major-mode meant to be the parent of programming mode. |
| 225 | ** define-minor-mode accepts a new keyword :variable. | 226 | ** define-minor-mode accepts a new keyword :variable. |
| 226 | 227 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 14311049a17..f258174625a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-05-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * eval.c (specbind): Remove left-over duplicate test. | ||
| 4 | Disallow let-binding frame-local vars. Add comment. | ||
| 5 | |||
| 1 | 2010-05-14 Eli Zaretskii <eliz@gnu.org> | 6 | 2010-05-14 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | Make the cache of bidi iterator states dynamically allocated. | 8 | Make the cache of bidi iterator states dynamically allocated. |
| @@ -5,7 +10,7 @@ | |||
| 5 | (bidi_init_it): Call it. | 10 | (bidi_init_it): Call it. |
| 6 | (bidi_cache_iterator_state): Enlarge the cache if needed. | 11 | (bidi_cache_iterator_state): Enlarge the cache if needed. |
| 7 | 12 | ||
| 8 | * bidi.c (bidi_move_to_visually_next): Renamed from | 13 | * bidi.c (bidi_move_to_visually_next): Rename from |
| 9 | bidi_get_next_char_visually. All callers changed. | 14 | bidi_get_next_char_visually. All callers changed. |
| 10 | 15 | ||
| 11 | 2010-05-14 Kenichi Handa <handa@m17n.org> | 16 | 2010-05-14 Kenichi Handa <handa@m17n.org> |
| @@ -18,8 +23,8 @@ | |||
| 18 | Set CMP_IT->reversed_p. | 23 | Set CMP_IT->reversed_p. |
| 19 | (composition_update_it): Pay attention to CMP_IT->reversed_p. | 24 | (composition_update_it): Pay attention to CMP_IT->reversed_p. |
| 20 | 25 | ||
| 21 | * xdisp.c (set_iterator_to_next): Call | 26 | * xdisp.c (set_iterator_to_next): |
| 22 | composition_compute_stop_pos with negative ENDPOS if we are | 27 | Call composition_compute_stop_pos with negative ENDPOS if we are |
| 23 | scanning backward. Call composition_compute_stop_pos if scan | 28 | scanning backward. Call composition_compute_stop_pos if scan |
| 24 | direction is changed. | 29 | direction is changed. |
| 25 | (next_element_from_buffer): Call composition_compute_stop_pos with | 30 | (next_element_from_buffer): Call composition_compute_stop_pos with |
diff --git a/src/eval.c b/src/eval.c index 2a0330acc38..199c4705736 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -3308,6 +3308,21 @@ grow_specpdl () | |||
| 3308 | specpdl_ptr = specpdl + count; | 3308 | specpdl_ptr = specpdl + count; |
| 3309 | } | 3309 | } |
| 3310 | 3310 | ||
| 3311 | /* specpdl_ptr->symbol is a field which describes which variable is | ||
| 3312 | let-bound, so it can be properly undone when we unbind_to. | ||
| 3313 | It can have the following two shapes: | ||
| 3314 | - SYMBOL : if it's a plain symbol, it means that we have let-bound | ||
| 3315 | a symbol that is not buffer-local (at least at the time | ||
| 3316 | the let binding started). Note also that it should not be | ||
| 3317 | aliased (i.e. when let-binding V1 that's aliased to V2, we want | ||
| 3318 | to record V2 here). | ||
| 3319 | - (SYMBOL WHERE . BUFFER) : this means that it is a let-binding for | ||
| 3320 | variable SYMBOL which can be buffer-local. WHERE tells us | ||
| 3321 | which buffer is affected (or nil if the let-binding affects the | ||
| 3322 | global value of the variable) and BUFFER tells us which buffer was | ||
| 3323 | current (i.e. if WHERE is non-nil, then BUFFER==WHERE, otherwise | ||
| 3324 | BUFFER did not yet have a buffer-local value). */ | ||
| 3325 | |||
| 3311 | void | 3326 | void |
| 3312 | specbind (symbol, value) | 3327 | specbind (symbol, value) |
| 3313 | Lisp_Object symbol, value; | 3328 | Lisp_Object symbol, value; |
| @@ -3339,7 +3354,10 @@ specbind (symbol, value) | |||
| 3339 | set_internal (symbol, value, Qnil, 1); | 3354 | set_internal (symbol, value, Qnil, 1); |
| 3340 | break; | 3355 | break; |
| 3341 | } | 3356 | } |
| 3342 | case SYMBOL_LOCALIZED: case SYMBOL_FORWARDED: | 3357 | case SYMBOL_LOCALIZED: |
| 3358 | if (SYMBOL_BLV (sym)->frame_local) | ||
| 3359 | error ("Frame-local vars cannot be let-bound"); | ||
| 3360 | case SYMBOL_FORWARDED: | ||
| 3343 | { | 3361 | { |
| 3344 | Lisp_Object ovalue = find_symbol_value (symbol); | 3362 | Lisp_Object ovalue = find_symbol_value (symbol); |
| 3345 | specpdl_ptr->func = 0; | 3363 | specpdl_ptr->func = 0; |
| @@ -3376,6 +3394,7 @@ specbind (symbol, value) | |||
| 3376 | /* FIXME: The third value `current_buffer' is only used in | 3394 | /* FIXME: The third value `current_buffer' is only used in |
| 3377 | let_shadows_buffer_binding_p which is itself only used | 3395 | let_shadows_buffer_binding_p which is itself only used |
| 3378 | in set_internal for local_if_set. */ | 3396 | in set_internal for local_if_set. */ |
| 3397 | eassert (NILP (where) || EQ (where, cur_buf)); | ||
| 3379 | specpdl_ptr->symbol = Fcons (symbol, Fcons (where, cur_buf)); | 3398 | specpdl_ptr->symbol = Fcons (symbol, Fcons (where, cur_buf)); |
| 3380 | 3399 | ||
| 3381 | /* If SYMBOL is a per-buffer variable which doesn't have a | 3400 | /* If SYMBOL is a per-buffer variable which doesn't have a |
| @@ -3460,13 +3479,10 @@ unbind_to (count, value) | |||
| 3460 | Fset_default (symbol, this_binding.old_value); | 3479 | Fset_default (symbol, this_binding.old_value); |
| 3461 | /* If `where' is non-nil, reset the value in the appropriate | 3480 | /* If `where' is non-nil, reset the value in the appropriate |
| 3462 | local binding, but only if that binding still exists. */ | 3481 | local binding, but only if that binding still exists. */ |
| 3463 | else if (BUFFERP (where)) | 3482 | else if (BUFFERP (where) |
| 3464 | { | 3483 | ? !NILP (Flocal_variable_p (symbol, where)) |
| 3465 | if (BUFFERP (where) | 3484 | : !NILP (Fassq (symbol, XFRAME (where)->param_alist))) |
| 3466 | ? !NILP (Flocal_variable_p (symbol, where)) | 3485 | set_internal (symbol, this_binding.old_value, where, 1); |
| 3467 | : !NILP (Fassq (symbol, XFRAME (where)->param_alist))) | ||
| 3468 | set_internal (symbol, this_binding.old_value, where, 1); | ||
| 3469 | } | ||
| 3470 | } | 3486 | } |
| 3471 | /* If variable has a trivial value (no forwarding), we can | 3487 | /* If variable has a trivial value (no forwarding), we can |
| 3472 | just set it. No need to check for constant symbols here, | 3488 | just set it. No need to check for constant symbols here, |