diff options
| author | Eli Zaretskii | 2010-02-27 07:43:30 -0500 |
|---|---|---|
| committer | Eli Zaretskii | 2010-02-27 07:43:30 -0500 |
| commit | d23cd5eeb2993e55943d250ea8c2015da5b06a24 (patch) | |
| tree | 2b3eac653fd6869f83179e393a467d81f6421cf9 /src | |
| parent | 918f41599dfab54071920441d86c306ced83b550 (diff) | |
| parent | 8ff35869753b7ef1bd479d99fe685a47fa6b73ed (diff) | |
| download | emacs-d23cd5eeb2993e55943d250ea8c2015da5b06a24.tar.gz emacs-d23cd5eeb2993e55943d250ea8c2015da5b06a24.zip | |
Merge frome mainline.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 35 | ||||
| -rw-r--r-- | src/font.c | 24 | ||||
| -rw-r--r-- | src/ftfont.c | 18 | ||||
| -rw-r--r-- | src/gtkutil.c | 34 | ||||
| -rw-r--r-- | src/m/arm.h | 6 | ||||
| -rw-r--r-- | src/nsfont.m | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 9 | ||||
| -rw-r--r-- | src/xterm.c | 9 |
8 files changed, 97 insertions, 42 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 14e06fc1e28..ac909cc7885 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,38 @@ | |||
| 1 | 2010-02-27 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * font.c (font_parse_fcname): Recognize "Book", "Condensed", | ||
| 4 | "Medium", and "Semi-Condensed" keywords in GTK names (Bug#5646). | ||
| 5 | |||
| 6 | 2010-02-26 Kenichi Handa <handa@m17n.org> | ||
| 7 | |||
| 8 | * ftfont.c (ftfont_get_open_type_spec): Fix parsing of otf_spec. | ||
| 9 | |||
| 10 | * xdisp.c (reseat_to_string): Fix previous change. | ||
| 11 | |||
| 12 | 2010-02-26 David Reitter <david.reitter@gmail.com> | ||
| 13 | |||
| 14 | * nsfont.m (nsfont_draw): ns_antialias_text should be a | ||
| 15 | Lisp_Object (Bug#4736). | ||
| 16 | |||
| 17 | 2010-02-25 Kenichi Handa <handa@m17n.org> | ||
| 18 | |||
| 19 | * xdisp.c (reseat_to_string): Fix previous change (bug#5609). | ||
| 20 | |||
| 21 | 2010-02-24 Jan Djärv <jan.h.d@swipnet.se> | ||
| 22 | |||
| 23 | * xterm.c (XTflash): Move declarations before statements. | ||
| 24 | |||
| 25 | * gtkutil.c (xg_get_gdk_display): Remove (unused). | ||
| 26 | (xg_get_pixbuf_from_pix_and_mask, xg_create_frame_widgets) | ||
| 27 | (xg_toggle_notify_cb, xg_set_toolkit_scroll_bar_thumb) | ||
| 28 | (xg_create_tool_bar): Remove unused variables. | ||
| 29 | (x_wm_set_size_hint): Move declarations before statements. | ||
| 30 | (xg_create_frame_widgets): Remove variable grav, | ||
| 31 | |||
| 32 | 2010-02-21 Chong Yidong <cyd@stupidchicken.com> | ||
| 33 | |||
| 34 | * m/arm.h: Define the LIB_GCC flag to be -lgcc_s (Bug#5518). | ||
| 35 | |||
| 1 | 2010-02-18 Stefan Monnier <monnier@iro.umontreal.ca> | 36 | 2010-02-18 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 37 | ||
| 3 | * term.c (fatal): Add a final \n if needed (bug#5596). | 38 | * term.c (fatal): Add a final \n if needed (bug#5596). |
diff --git a/src/font.c b/src/font.c index 5f1d59afe22..765712198fe 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -1576,6 +1576,18 @@ font_parse_fcname (name, font) | |||
| 1576 | prop = font_intern_prop ("light", 5, 1); | 1576 | prop = font_intern_prop ("light", 5, 1); |
| 1577 | FONT_SET_STYLE (font, FONT_WEIGHT_INDEX, prop); | 1577 | FONT_SET_STYLE (font, FONT_WEIGHT_INDEX, prop); |
| 1578 | } | 1578 | } |
| 1579 | else if (PROP_MATCH ("Book", 4)) | ||
| 1580 | { | ||
| 1581 | prop_found = 1; | ||
| 1582 | prop = font_intern_prop ("book", 4, 1); | ||
| 1583 | FONT_SET_STYLE (font, FONT_WEIGHT_INDEX, prop); | ||
| 1584 | } | ||
| 1585 | else if (PROP_MATCH ("Medium", 6)) | ||
| 1586 | { | ||
| 1587 | prop_found = 1; | ||
| 1588 | prop = font_intern_prop ("medium", 6, 1); | ||
| 1589 | FONT_SET_STYLE (font, FONT_WEIGHT_INDEX, prop); | ||
| 1590 | } | ||
| 1579 | else if (PROP_MATCH ("Semi-Bold", 9)) | 1591 | else if (PROP_MATCH ("Semi-Bold", 9)) |
| 1580 | { | 1592 | { |
| 1581 | prop_found = 1; | 1593 | prop_found = 1; |
| @@ -1600,6 +1612,18 @@ font_parse_fcname (name, font) | |||
| 1600 | prop = font_intern_prop ("oblique", 7, 1); | 1612 | prop = font_intern_prop ("oblique", 7, 1); |
| 1601 | FONT_SET_STYLE (font, FONT_SLANT_INDEX, prop); | 1613 | FONT_SET_STYLE (font, FONT_SLANT_INDEX, prop); |
| 1602 | } | 1614 | } |
| 1615 | else if (PROP_MATCH ("Semi-Condensed", 14)) | ||
| 1616 | { | ||
| 1617 | prop_found = 1; | ||
| 1618 | prop = font_intern_prop ("semi-condensed", 14, 1); | ||
| 1619 | FONT_SET_STYLE (font, FONT_WIDTH_INDEX, prop); | ||
| 1620 | } | ||
| 1621 | else if (PROP_MATCH ("Condensed", 9)) | ||
| 1622 | { | ||
| 1623 | prop_found = 1; | ||
| 1624 | prop = font_intern_prop ("condensed", 9, 1); | ||
| 1625 | FONT_SET_STYLE (font, FONT_WIDTH_INDEX, prop); | ||
| 1626 | } | ||
| 1603 | else { | 1627 | else { |
| 1604 | if (prop_found) | 1628 | if (prop_found) |
| 1605 | return -1; /* Unknown property in GTK-style font name. */ | 1629 | return -1; /* Unknown property in GTK-style font name. */ |
diff --git a/src/ftfont.c b/src/ftfont.c index 492d03bb8bf..f4fe5b8e5c0 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -663,19 +663,19 @@ ftfont_get_open_type_spec (Lisp_Object otf_spec) | |||
| 663 | else | 663 | else |
| 664 | spec->script_tag = 0x44464C54; /* "DFLT" */ | 664 | spec->script_tag = 0x44464C54; /* "DFLT" */ |
| 665 | otf_spec = XCDR (otf_spec); | 665 | otf_spec = XCDR (otf_spec); |
| 666 | val = XCAR (otf_spec); | 666 | spec->langsys_tag = 0; |
| 667 | if (! NILP (val)) | 667 | if (! NILP (otf_spec)) |
| 668 | OTF_SYM_TAG (val, spec->langsys_tag); | 668 | { |
| 669 | else | 669 | val = XCAR (otf_spec); |
| 670 | spec->langsys_tag = 0; | 670 | if (! NILP (val)) |
| 671 | OTF_SYM_TAG (val, spec->langsys_tag); | ||
| 672 | otf_spec = XCDR (otf_spec); | ||
| 673 | } | ||
| 671 | spec->nfeatures[0] = spec->nfeatures[1] = 0; | 674 | spec->nfeatures[0] = spec->nfeatures[1] = 0; |
| 672 | for (i = 0; i < 2; i++) | 675 | for (i = 0; i < 2 && ! NILP (otf_spec); i++, otf_spec = XCDR (otf_spec)) |
| 673 | { | 676 | { |
| 674 | Lisp_Object len; | 677 | Lisp_Object len; |
| 675 | 678 | ||
| 676 | otf_spec = XCDR (otf_spec); | ||
| 677 | if (NILP (otf_spec)) | ||
| 678 | break; | ||
| 679 | val = XCAR (otf_spec); | 679 | val = XCAR (otf_spec); |
| 680 | if (NILP (val)) | 680 | if (NILP (val)) |
| 681 | continue; | 681 | continue; |
diff --git a/src/gtkutil.c b/src/gtkutil.c index a42c07aef5d..2764382e8a1 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -58,15 +58,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 58 | 58 | ||
| 59 | static GdkDisplay *gdpy_def; | 59 | static GdkDisplay *gdpy_def; |
| 60 | 60 | ||
| 61 | /* Return the GdkDisplay that corresponds to the X display DPY. */ | ||
| 62 | |||
| 63 | static GdkDisplay * | ||
| 64 | xg_get_gdk_display (dpy) | ||
| 65 | Display *dpy; | ||
| 66 | { | ||
| 67 | return gdk_x11_lookup_xdisplay (dpy); | ||
| 68 | } | ||
| 69 | |||
| 70 | /* When the GTK widget W is to be created on a display for F that | 61 | /* When the GTK widget W is to be created on a display for F that |
| 71 | is not the default display, set the display for W. | 62 | is not the default display, set the display for W. |
| 72 | W can be a GtkMenu or a GtkWindow widget. */ | 63 | W can be a GtkMenu or a GtkWindow widget. */ |
| @@ -252,10 +243,8 @@ xg_get_pixbuf_from_pix_and_mask (gpix, gmask, cmap) | |||
| 252 | GdkPixmap *gmask; | 243 | GdkPixmap *gmask; |
| 253 | GdkColormap *cmap; | 244 | GdkColormap *cmap; |
| 254 | { | 245 | { |
| 255 | int x, y, width, height, rowstride, mask_rowstride; | 246 | int width, height; |
| 256 | GdkPixbuf *icon_buf, *tmp_buf; | 247 | GdkPixbuf *icon_buf, *tmp_buf; |
| 257 | guchar *pixels; | ||
| 258 | guchar *mask_pixels; | ||
| 259 | 248 | ||
| 260 | gdk_drawable_get_size (gpix, &width, &height); | 249 | gdk_drawable_get_size (gpix, &width, &height); |
| 261 | tmp_buf = gdk_pixbuf_get_from_drawable (NULL, gpix, cmap, | 250 | tmp_buf = gdk_pixbuf_get_from_drawable (NULL, gpix, cmap, |
| @@ -776,7 +765,6 @@ xg_create_frame_widgets (f) | |||
| 776 | GtkWidget *wfixed; | 765 | GtkWidget *wfixed; |
| 777 | GdkColor bg; | 766 | GdkColor bg; |
| 778 | GtkRcStyle *style; | 767 | GtkRcStyle *style; |
| 779 | int i; | ||
| 780 | char *title = 0; | 768 | char *title = 0; |
| 781 | 769 | ||
| 782 | BLOCK_INPUT; | 770 | BLOCK_INPUT; |
| @@ -844,8 +832,8 @@ xg_create_frame_widgets (f) | |||
| 844 | and specify it. | 832 | and specify it. |
| 845 | GTK will itself handle calculating the real position this way. */ | 833 | GTK will itself handle calculating the real position this way. */ |
| 846 | xg_set_geometry (f); | 834 | xg_set_geometry (f); |
| 847 | int grav = gtk_window_get_gravity (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f))); | 835 | f->win_gravity |
| 848 | f->win_gravity = grav; | 836 | = gtk_window_get_gravity (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f))); |
| 849 | 837 | ||
| 850 | gtk_widget_add_events (wfixed, | 838 | gtk_widget_add_events (wfixed, |
| 851 | GDK_POINTER_MOTION_MASK | 839 | GDK_POINTER_MOTION_MASK |
| @@ -901,12 +889,6 @@ x_wm_set_size_hint (f, flags, user_position) | |||
| 901 | long flags; | 889 | long flags; |
| 902 | int user_position; | 890 | int user_position; |
| 903 | { | 891 | { |
| 904 | /* Don't set size hints during initialization; that apparently leads | ||
| 905 | to a race condition. See the thread at | ||
| 906 | http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00033.html */ | ||
| 907 | if (NILP (Vafter_init_time) || !FRAME_GTK_OUTER_WIDGET (f)) | ||
| 908 | return; | ||
| 909 | |||
| 910 | /* Must use GTK routines here, otherwise GTK resets the size hints | 892 | /* Must use GTK routines here, otherwise GTK resets the size hints |
| 911 | to its own defaults. */ | 893 | to its own defaults. */ |
| 912 | GdkGeometry size_hints; | 894 | GdkGeometry size_hints; |
| @@ -915,6 +897,12 @@ x_wm_set_size_hint (f, flags, user_position) | |||
| 915 | int min_rows = 0, min_cols = 0; | 897 | int min_rows = 0, min_cols = 0; |
| 916 | int win_gravity = f->win_gravity; | 898 | int win_gravity = f->win_gravity; |
| 917 | 899 | ||
| 900 | /* Don't set size hints during initialization; that apparently leads | ||
| 901 | to a race condition. See the thread at | ||
| 902 | http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00033.html */ | ||
| 903 | if (NILP (Vafter_init_time) || !FRAME_GTK_OUTER_WIDGET (f)) | ||
| 904 | return; | ||
| 905 | |||
| 918 | if (flags) | 906 | if (flags) |
| 919 | { | 907 | { |
| 920 | memset (&size_hints, 0, sizeof (size_hints)); | 908 | memset (&size_hints, 0, sizeof (size_hints)); |
| @@ -1391,7 +1379,6 @@ xg_toggle_notify_cb (gobject, arg1, user_data) | |||
| 1391 | 1379 | ||
| 1392 | if (strcmp (arg1->name, "show-hidden") == 0) | 1380 | if (strcmp (arg1->name, "show-hidden") == 0) |
| 1393 | { | 1381 | { |
| 1394 | GtkFileChooser *dialog = GTK_FILE_CHOOSER (gobject); | ||
| 1395 | GtkWidget *wtoggle = GTK_WIDGET (user_data); | 1382 | GtkWidget *wtoggle = GTK_WIDGET (user_data); |
| 1396 | gboolean visible, toggle_on; | 1383 | gboolean visible, toggle_on; |
| 1397 | 1384 | ||
| @@ -3347,8 +3334,6 @@ xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | |||
| 3347 | 3334 | ||
| 3348 | if (changed || (int) gtk_range_get_value (GTK_RANGE (wscroll)) != value) | 3335 | if (changed || (int) gtk_range_get_value (GTK_RANGE (wscroll)) != value) |
| 3349 | { | 3336 | { |
| 3350 | GtkWidget *wfixed = f->output_data.x->edit_widget; | ||
| 3351 | |||
| 3352 | BLOCK_INPUT; | 3337 | BLOCK_INPUT; |
| 3353 | 3338 | ||
| 3354 | /* gtk_range_set_value invokes the callback. Set | 3339 | /* gtk_range_set_value invokes the callback. Set |
| @@ -3801,7 +3786,6 @@ xg_create_tool_bar (f) | |||
| 3801 | FRAME_PTR f; | 3786 | FRAME_PTR f; |
| 3802 | { | 3787 | { |
| 3803 | struct x_output *x = f->output_data.x; | 3788 | struct x_output *x = f->output_data.x; |
| 3804 | GtkRequisition req; | ||
| 3805 | 3789 | ||
| 3806 | x->toolbar_widget = gtk_toolbar_new (); | 3790 | x->toolbar_widget = gtk_toolbar_new (); |
| 3807 | x->toolbar_detached = 0; | 3791 | x->toolbar_detached = 0; |
diff --git a/src/m/arm.h b/src/m/arm.h index ad3e701d276..b04c5ecc1d9 100644 --- a/src/m/arm.h +++ b/src/m/arm.h | |||
| @@ -36,5 +36,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 36 | 36 | ||
| 37 | #define NO_REMAP | 37 | #define NO_REMAP |
| 38 | 38 | ||
| 39 | /* armin76@gentoo.org reported that the lgcc_s flag is necessary to | ||
| 40 | build on ARM EABI under GNU/Linux (Bug#5518). */ | ||
| 41 | #ifdef GNU_LINUX | ||
| 42 | #define LIB_GCC -lgcc_s | ||
| 43 | #endif | ||
| 44 | |||
| 39 | /* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42 | 45 | /* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42 |
| 40 | (do not change this comment) */ | 46 | (do not change this comment) */ |
diff --git a/src/nsfont.m b/src/nsfont.m index 97d74a82f2b..59d5ee73db1 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -50,7 +50,7 @@ extern Lisp_Object Qnormal, Qbold, Qitalic, Qcondensed, Qexpanded; | |||
| 50 | static Lisp_Object Vns_reg_to_script; | 50 | static Lisp_Object Vns_reg_to_script; |
| 51 | static Lisp_Object Qapple, Qroman, Qmedium; | 51 | static Lisp_Object Qapple, Qroman, Qmedium; |
| 52 | extern Lisp_Object Qappend; | 52 | extern Lisp_Object Qappend; |
| 53 | extern int ns_antialias_text; | 53 | extern Lisp_Object ns_antialias_text; |
| 54 | extern float ns_antialias_threshold; | 54 | extern float ns_antialias_threshold; |
| 55 | extern int ns_tmp_flags; | 55 | extern int ns_tmp_flags; |
| 56 | extern struct nsfont_info *ns_tmp_font; | 56 | extern struct nsfont_info *ns_tmp_font; |
| @@ -1231,7 +1231,7 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y, | |||
| 1231 | 1231 | ||
| 1232 | CGContextSetFont (gcontext, font->cgfont); | 1232 | CGContextSetFont (gcontext, font->cgfont); |
| 1233 | CGContextSetFontSize (gcontext, font->size); | 1233 | CGContextSetFontSize (gcontext, font->size); |
| 1234 | if (ns_antialias_text == Qnil || font->size <= ns_antialias_threshold) | 1234 | if (NILP (ns_antialias_text) || font->size <= ns_antialias_threshold) |
| 1235 | CGContextSetShouldAntialias (gcontext, 0); | 1235 | CGContextSetShouldAntialias (gcontext, 0); |
| 1236 | else | 1236 | else |
| 1237 | CGContextSetShouldAntialias (gcontext, 1); | 1237 | CGContextSetShouldAntialias (gcontext, 1); |
diff --git a/src/xdisp.c b/src/xdisp.c index f27d99fa5f9..056a009a7d9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5745,8 +5745,13 @@ reseat_to_string (it, s, string, charpos, precision, field_width, multibyte) | |||
| 5745 | 5745 | ||
| 5746 | it->stop_charpos = charpos; | 5746 | it->stop_charpos = charpos; |
| 5747 | if (s == NULL && it->multibyte_p) | 5747 | if (s == NULL && it->multibyte_p) |
| 5748 | composition_compute_stop_pos (&it->cmp_it, charpos, -1, it->end_charpos, | 5748 | { |
| 5749 | it->string); | 5749 | EMACS_INT endpos = SCHARS (it->string); |
| 5750 | if (endpos > it->end_charpos) | ||
| 5751 | endpos = it->end_charpos; | ||
| 5752 | composition_compute_stop_pos (&it->cmp_it, charpos, -1, endpos, | ||
| 5753 | it->string); | ||
| 5754 | } | ||
| 5750 | CHECK_IT (it); | 5755 | CHECK_IT (it); |
| 5751 | } | 5756 | } |
| 5752 | 5757 | ||
diff --git a/src/xterm.c b/src/xterm.c index b4a04195430..fd09d6d4815 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -3019,13 +3019,14 @@ XTflash (f) | |||
| 3019 | /* Use Gdk routines to draw. This way, we won't draw over scroll bars | 3019 | /* Use Gdk routines to draw. This way, we won't draw over scroll bars |
| 3020 | when the scroll bars and the edit widget share the same X window. */ | 3020 | when the scroll bars and the edit widget share the same X window. */ |
| 3021 | GdkGCValues vals; | 3021 | GdkGCValues vals; |
| 3022 | GdkGC *gc; | ||
| 3022 | vals.foreground.pixel = (FRAME_FOREGROUND_PIXEL (f) | 3023 | vals.foreground.pixel = (FRAME_FOREGROUND_PIXEL (f) |
| 3023 | ^ FRAME_BACKGROUND_PIXEL (f)); | 3024 | ^ FRAME_BACKGROUND_PIXEL (f)); |
| 3024 | vals.function = GDK_XOR; | 3025 | vals.function = GDK_XOR; |
| 3025 | GdkGC *gc = gdk_gc_new_with_values (FRAME_GTK_WIDGET (f)->window, | 3026 | gc = gdk_gc_new_with_values (FRAME_GTK_WIDGET (f)->window, |
| 3026 | &vals, | 3027 | &vals, |
| 3027 | GDK_GC_FUNCTION | 3028 | GDK_GC_FUNCTION |
| 3028 | | GDK_GC_FOREGROUND); | 3029 | | GDK_GC_FOREGROUND); |
| 3029 | #define XFillRectangle(d, win, gc, x, y, w, h) \ | 3030 | #define XFillRectangle(d, win, gc, x, y, w, h) \ |
| 3030 | gdk_draw_rectangle (FRAME_GTK_WIDGET (f)->window, \ | 3031 | gdk_draw_rectangle (FRAME_GTK_WIDGET (f)->window, \ |
| 3031 | gc, TRUE, x, y, w, h) | 3032 | gc, TRUE, x, y, w, h) |