diff options
| author | Stefan Monnier | 2008-05-30 02:37:40 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-05-30 02:37:40 +0000 |
| commit | fd9440c58241b6a9f6da824522d2f666d54412aa (patch) | |
| tree | dd871520a01a2503d8e9261a34fdb02687f5a8db /src | |
| parent | 7736dabea784c9fb44b3d1a9a1882a5ff3e16271 (diff) | |
| download | emacs-fd9440c58241b6a9f6da824522d2f666d54412aa.tar.gz emacs-fd9440c58241b6a9f6da824522d2f666d54412aa.zip | |
(Fmake_variable_buffer_local, Fmake_local_variable)
(Fmake_variable_frame_local): Disallow mixing buffer-local and
frame-local settings for the same variable.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 23 | ||||
| -rw-r--r-- | src/data.c | 13 |
2 files changed, 24 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d79125ca7ee..c10153c047d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,10 +1,16 @@ | |||
| 1 | 2008-05-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * data.c (Fmake_variable_buffer_local, Fmake_local_variable) | ||
| 4 | (Fmake_variable_frame_local): Disallow mixing buffer-local and | ||
| 5 | frame-local settings for the same variable. | ||
| 6 | |||
| 1 | 2008-05-29 Kenichi Handa <handa@m17n.org> | 7 | 2008-05-29 Kenichi Handa <handa@m17n.org> |
| 2 | 8 | ||
| 3 | * coding.h (enum define_coding_utf8_arg_index): New enum. | 9 | * coding.h (enum define_coding_utf8_arg_index): New enum. |
| 4 | (enum coding_attr_index): Change coding_attr_utf_16_bom to | 10 | (enum coding_attr_index): Change coding_attr_utf_16_bom to |
| 5 | coding_attr_utf_bom. | 11 | coding_attr_utf_bom. |
| 6 | (enum utf_bom_type): Renamed from utf_16_bom_type. | 12 | (enum utf_bom_type): Rename from utf_16_bom_type. |
| 7 | (struct utf_16_spec): Adjusted for the above change. | 13 | (struct utf_16_spec): Adjust for the above change. |
| 8 | (struct coding_system): Add utf_8_bom in `spec' union. | 14 | (struct coding_system): Add utf_8_bom in `spec' union. |
| 9 | 15 | ||
| 10 | * coding.c (CODING_UTF_8_BOM): New macro. | 16 | * coding.c (CODING_UTF_8_BOM): New macro. |
| @@ -21,8 +27,7 @@ | |||
| 21 | (UTF_BOM, UTF_8_BOM_1, UTF_8_BOM_2, UTF_8_BOM_3): New macros. | 27 | (UTF_BOM, UTF_8_BOM_1, UTF_8_BOM_2, UTF_8_BOM_3): New macros. |
| 22 | (detect_coding_utf_8): Check BOM. | 28 | (detect_coding_utf_8): Check BOM. |
| 23 | (decode_coding_utf_8, encode_coding_utf_8): Handle BOM. | 29 | (decode_coding_utf_8, encode_coding_utf_8): Handle BOM. |
| 24 | (decode_coding_utf_16): Adjusted for the change of enum | 30 | (decode_coding_utf_16): Adjust for the change of enum utf_bom_type. |
| 25 | utf_bom_type. | ||
| 26 | (encode_coding_utf_16): Likewise. | 31 | (encode_coding_utf_16): Likewise. |
| 27 | (setup_coding_system): Likewise. Set CODING_UTF_8_BOM (coding). | 32 | (setup_coding_system): Likewise. Set CODING_UTF_8_BOM (coding). |
| 28 | (detect_coding, detect_coding_system): Handle utf-8-auto. | 33 | (detect_coding, detect_coding_system): Handle utf-8-auto. |
| @@ -38,11 +43,11 @@ | |||
| 38 | 43 | ||
| 39 | 2008-05-29 Jason Rumney <jasonr@gnu.org> | 44 | 2008-05-29 Jason Rumney <jasonr@gnu.org> |
| 40 | 45 | ||
| 41 | * w32font.c (w32font_open_internal): Prefer truetype fonts unless | 46 | * w32font.c (w32font_open_internal): Prefer truetype fonts unless |
| 42 | `raster' specified. | 47 | `raster' specified. |
| 43 | (add_font_entity_to_list): Allow non-opentype truetype fonts back | 48 | (add_font_entity_to_list): Allow non-opentype truetype fonts back |
| 44 | in the uniscribe backend, but disallow any font that has no | 49 | in the uniscribe backend, but disallow any font that has no |
| 45 | unicode subrange support. | 50 | unicode subrange support. |
| 46 | 51 | ||
| 47 | 2008-05-29 Juanma Barranquero <lekktu@gmail.com> | 52 | 2008-05-29 Juanma Barranquero <lekktu@gmail.com> |
| 48 | 53 | ||
diff --git a/src/data.c b/src/data.c index f86d5c7c61b..8ee41ba8524 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -1493,7 +1493,11 @@ The function `default-value' gets the default value and `set-default' sets it. | |||
| 1493 | if (BUFFER_OBJFWDP (valcontents)) | 1493 | if (BUFFER_OBJFWDP (valcontents)) |
| 1494 | return variable; | 1494 | return variable; |
| 1495 | else if (BUFFER_LOCAL_VALUEP (valcontents)) | 1495 | else if (BUFFER_LOCAL_VALUEP (valcontents)) |
| 1496 | newval = valcontents; | 1496 | { |
| 1497 | if (XBUFFER_LOCAL_VALUE (valcontents)->check_frame) | ||
| 1498 | error ("Symbol %s may not be buffer-local", SDATA (sym->xname)); | ||
| 1499 | newval = valcontents; | ||
| 1500 | } | ||
| 1497 | else | 1501 | else |
| 1498 | { | 1502 | { |
| 1499 | if (EQ (valcontents, Qunbound)) | 1503 | if (EQ (valcontents, Qunbound)) |
| @@ -1545,7 +1549,9 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) | |||
| 1545 | sym = indirect_variable (XSYMBOL (variable)); | 1549 | sym = indirect_variable (XSYMBOL (variable)); |
| 1546 | 1550 | ||
| 1547 | valcontents = sym->value; | 1551 | valcontents = sym->value; |
| 1548 | if (sym->constant || KBOARD_OBJFWDP (valcontents)) | 1552 | if (sym->constant || KBOARD_OBJFWDP (valcontents) |
| 1553 | || (BUFFER_LOCAL_VALUEP (valcontents) | ||
| 1554 | && (XBUFFER_LOCAL_VALUE (valcontents)->check_frame))) | ||
| 1549 | error ("Symbol %s may not be buffer-local", SDATA (sym->xname)); | 1555 | error ("Symbol %s may not be buffer-local", SDATA (sym->xname)); |
| 1550 | 1556 | ||
| 1551 | if ((BUFFER_LOCAL_VALUEP (valcontents) | 1557 | if ((BUFFER_LOCAL_VALUEP (valcontents) |
| @@ -1709,7 +1715,8 @@ Buffer-local bindings take precedence over frame-local bindings. */) | |||
| 1709 | 1715 | ||
| 1710 | if (BUFFER_LOCAL_VALUEP (valcontents)) | 1716 | if (BUFFER_LOCAL_VALUEP (valcontents)) |
| 1711 | { | 1717 | { |
| 1712 | XBUFFER_LOCAL_VALUE (valcontents)->check_frame = 1; | 1718 | if (!XBUFFER_LOCAL_VALUE (valcontents)->check_frame) |
| 1719 | error ("Symbol %s may not be frame-local", SDATA (sym->xname)); | ||
| 1713 | return variable; | 1720 | return variable; |
| 1714 | } | 1721 | } |
| 1715 | 1722 | ||