diff options
| author | Miles Bader | 2007-06-11 01:00:07 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-06-11 01:00:07 +0000 |
| commit | 67f3ad67ee317226cb5d1bb139de0cfd883fdc5e (patch) | |
| tree | 58a0e1bea7a1d8728fd32e6127a44434e7eac006 /src/xfns.c | |
| parent | d17cf4eb2024cf54e4a216312184665094ee3df4 (diff) | |
| parent | 2d715b39ea1c89066f469405d065dd1a6631d28e (diff) | |
| download | emacs-67f3ad67ee317226cb5d1bb139de0cfd883fdc5e.tar.gz emacs-67f3ad67ee317226cb5d1bb139de0cfd883fdc5e.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 781-792)
- Update from CVS
- Merge from gnus--rel--5.10
- Merge from emacs--rel--22
* emacs--rel--22 (patch 33-41)
* gnus--rel--5.10 (patch 226-228)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-21
Diffstat (limited to 'src/xfns.c')
| -rw-r--r-- | src/xfns.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/xfns.c b/src/xfns.c index f2c85814847..e51dea84118 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1525,6 +1525,8 @@ x_set_scroll_bar_background (f, value, oldval) | |||
| 1525 | /* Encode Lisp string STRING as a text in a format appropriate for | 1525 | /* Encode Lisp string STRING as a text in a format appropriate for |
| 1526 | XICCC (X Inter Client Communication Conventions). | 1526 | XICCC (X Inter Client Communication Conventions). |
| 1527 | 1527 | ||
| 1528 | This can call Lisp code, so callers must GCPRO. | ||
| 1529 | |||
| 1528 | If STRING contains only ASCII characters, do no conversion and | 1530 | If STRING contains only ASCII characters, do no conversion and |
| 1529 | return the string data of STRING. Otherwise, encode the text by | 1531 | return the string data of STRING. Otherwise, encode the text by |
| 1530 | CODING_SYSTEM, and return a newly allocated memory area which | 1532 | CODING_SYSTEM, and return a newly allocated memory area which |
| @@ -1572,7 +1574,11 @@ x_encode_text (string, coding_system, selectionp, text_bytes, stringp, freep) | |||
| 1572 | && SYMBOLP (coding.pre_write_conversion) | 1574 | && SYMBOLP (coding.pre_write_conversion) |
| 1573 | && !NILP (Ffboundp (coding.pre_write_conversion))) | 1575 | && !NILP (Ffboundp (coding.pre_write_conversion))) |
| 1574 | { | 1576 | { |
| 1577 | struct gcpro gcpro1; | ||
| 1578 | /* We don't need to GCPRO string. */ | ||
| 1579 | GCPRO1 (coding_system); | ||
| 1575 | string = run_pre_post_conversion_on_str (string, &coding, 1); | 1580 | string = run_pre_post_conversion_on_str (string, &coding, 1); |
| 1581 | UNGCPRO; | ||
| 1576 | str = SDATA (string); | 1582 | str = SDATA (string); |
| 1577 | chars = SCHARS (string); | 1583 | chars = SCHARS (string); |
| 1578 | bytes = SBYTES (string); | 1584 | bytes = SBYTES (string); |
| @@ -1614,6 +1620,16 @@ x_set_name_internal (f, name) | |||
| 1614 | int bytes, stringp; | 1620 | int bytes, stringp; |
| 1615 | int do_free_icon_value = 0, do_free_text_value = 0; | 1621 | int do_free_icon_value = 0, do_free_text_value = 0; |
| 1616 | Lisp_Object coding_system; | 1622 | Lisp_Object coding_system; |
| 1623 | #ifdef USE_GTK | ||
| 1624 | Lisp_Object encoded_name; | ||
| 1625 | struct gcpro gcpro1; | ||
| 1626 | |||
| 1627 | /* As ENCODE_UTF_8 may cause GC and relocation of string data, | ||
| 1628 | we use it before x_encode_text that may return string data. */ | ||
| 1629 | GCPRO1 (name); | ||
| 1630 | encoded_name = ENCODE_UTF_8 (name); | ||
| 1631 | UNGCPRO; | ||
| 1632 | #endif | ||
| 1617 | 1633 | ||
| 1618 | coding_system = Qcompound_text; | 1634 | coding_system = Qcompound_text; |
| 1619 | /* Note: Encoding strategy | 1635 | /* Note: Encoding strategy |
| @@ -1654,7 +1670,7 @@ x_set_name_internal (f, name) | |||
| 1654 | 1670 | ||
| 1655 | #ifdef USE_GTK | 1671 | #ifdef USE_GTK |
| 1656 | gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), | 1672 | gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), |
| 1657 | (char *) SDATA (ENCODE_UTF_8 (name))); | 1673 | (char *) SDATA (encoded_name)); |
| 1658 | #else /* not USE_GTK */ | 1674 | #else /* not USE_GTK */ |
| 1659 | XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); | 1675 | XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); |
| 1660 | #endif /* not USE_GTK */ | 1676 | #endif /* not USE_GTK */ |
| @@ -1840,9 +1856,9 @@ x_default_scroll_bar_color_parameter (f, alist, prop, xprop, xclass, | |||
| 1840 | build_string (foreground_p | 1856 | build_string (foreground_p |
| 1841 | ? "foreground" | 1857 | ? "foreground" |
| 1842 | : "background"), | 1858 | : "background"), |
| 1843 | empty_string, | 1859 | empty_unibyte_string, |
| 1844 | build_string ("verticalScrollBar"), | 1860 | build_string ("verticalScrollBar"), |
| 1845 | empty_string); | 1861 | empty_unibyte_string); |
| 1846 | if (!STRINGP (tem)) | 1862 | if (!STRINGP (tem)) |
| 1847 | { | 1863 | { |
| 1848 | /* If nothing has been specified, scroll bars will use a | 1864 | /* If nothing has been specified, scroll bars will use a |