aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2010-06-23 13:19:18 +0200
committerJoakim Verona2010-06-23 13:19:18 +0200
commitff982c322045ced3480f3a36fcf05acaf84547c1 (patch)
tree4efe998261ff6d0f8752ebeeb84938e6a7b6effc /src
parent14d0b57c0e88c730d676197f923a18d6b926b6ed (diff)
parent04c23739823fecd98cbc06ad627b36e5bd8e482e (diff)
downloademacs-ff982c322045ced3480f3a36fcf05acaf84547c1.tar.gz
emacs-ff982c322045ced3480f3a36fcf05acaf84547c1.zip
erge and a readme
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog44
-rw-r--r--src/font.c2
-rw-r--r--src/gtkutil.c28
-rw-r--r--src/gtkutil.h1
-rw-r--r--src/lread.c12
-rw-r--r--src/xdisp.c45
-rw-r--r--src/xfns.c26
-rw-r--r--src/xterm.c1
8 files changed, 121 insertions, 38 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3e6c8f24398..b52d6c1dffe 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,44 @@
12010-06-22 Jan Djärv <jan.h.d@swipnet.se>
2
3 * xterm.c (x_scroll_bar_create): Remove call to xg_show_scroll_bar.
4
5 * gtkutil.h (xg_show_scroll_bar): : Remove.
6
7 * gtkutil.c (xg_update_scrollbar_pos): Show/hide scroll bar as needed
8 if height is less than scroll bar min size.
9 (xg_show_scroll_bar): Remove, show moved to xg_update_scrollbar_pos.
10
11 * xfns.c (x_default_font_parameter): Try to open font from system
12 before using it (bug#6478). Rename got_from_gconf to got_from_system.
13
142010-06-22 Keith Packard <keithp@keithp.com> (tiny change)
15
16 * font.c (font_parse_fcname): Allow . for sizes like 7.5 (bug#6437).
17
182010-06-20 Eli Zaretskii <eliz@gnu.org>
19
20 * xdisp.c (try_scrolling): When scroll-conservatively is set to
21 most-positive-fixnum, be extra accurate when scrolling window
22 start, to avoid missing the cursor line.
23
242010-06-19 Eli Zaretskii <eliz@gnu.org>
25
26 * xdisp.c (try_scrolling): Compute the limit for searching point
27 in forward scroll from scroll_max, instead of an arbitrary limit
28 of 10 screen lines. See
29 http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00766.html
30 and
31 http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00773.html
32 for details.
33
342010-06-16 Glenn Morris <rgm@gnu.org>
35
36 * editfns.c (Fbyte_to_string): Pacify compiler.
37
382010-06-16 Stefan Monnier <monnier@iro.umontreal.ca>
39
40 * lread.c (read1): Phase out old-style backquotes a bit more.
41
12010-06-12 Eli Zaretskii <eliz@gnu.org> 422010-06-12 Eli Zaretskii <eliz@gnu.org>
2 43
3 * makefile.w32-in ($(BLD)/bidi.$(O)): Depend on biditype.h and 44 * makefile.w32-in ($(BLD)/bidi.$(O)): Depend on biditype.h and
@@ -7,8 +48,7 @@
7 48
8 * bidi.c (bidi_initialize): Remove explicit initialization of 49 * bidi.c (bidi_initialize): Remove explicit initialization of
9 bidi_type_table; include biditype.h instead. Don't support 50 bidi_type_table; include biditype.h instead. Don't support
10 entries whose second codepoint is zero. Initialize 51 entries whose second codepoint is zero. Initialize bidi_mirror_table.
11 bidi_mirror_table.
12 (bidi_mirror_char): Use bidi_mirror_table. 52 (bidi_mirror_char): Use bidi_mirror_table.
13 53
14 * biditype.h: New file. 54 * biditype.h: New file.
diff --git a/src/font.c b/src/font.c
index e07dbc5dd16..f9c2381fa70 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1544,7 +1544,7 @@ font_parse_fcname (name, font)
1544 int size_found = 1; 1544 int size_found = 1;
1545 1545
1546 for (q = p + 1; *q && *q != ' '; q++) 1546 for (q = p + 1; *q && *q != ' '; q++)
1547 if (! isdigit (*q)) 1547 if (! isdigit (*q) && *q != '.')
1548 { 1548 {
1549 size_found = 0; 1549 size_found = 0;
1550 break; 1550 break;
diff --git a/src/gtkutil.c b/src/gtkutil.c
index f77669c419d..8e7fec39134 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3178,17 +3178,6 @@ xg_create_scroll_bar (f, bar, scroll_callback, end_callback, scroll_bar_name)
3178 bar->x_window = scroll_id; 3178 bar->x_window = scroll_id;
3179} 3179}
3180 3180
3181/* Make the scroll bar represented by SCROLLBAR_ID visible. */
3182
3183void
3184xg_show_scroll_bar (scrollbar_id)
3185 int scrollbar_id;
3186{
3187 GtkWidget *w = xg_get_widget_from_map (scrollbar_id);
3188 if (w)
3189 gtk_widget_show_all (gtk_widget_get_parent (w));
3190}
3191
3192/* Remove the scroll bar represented by SCROLLBAR_ID from the frame F. */ 3181/* Remove the scroll bar represented by SCROLLBAR_ID from the frame F. */
3193 3182
3194void 3183void
@@ -3247,10 +3236,23 @@ xg_update_scrollbar_pos (f, scrollbar_id, top, left, width, height)
3247 3236
3248 /* Move and resize to new values. */ 3237 /* Move and resize to new values. */
3249 gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top); 3238 gtk_fixed_move (GTK_FIXED (wfixed), wparent, left, top);
3250 gtk_widget_set_size_request (wscroll, width, height); 3239 gint msl;
3240 gtk_widget_style_get (wscroll, "min-slider-length", &msl, NULL);
3241 if (msl > height)
3242 {
3243 /* No room. Hide scroll bar as some themes output a warning if
3244 the height is less than the min size. */
3245 gtk_widget_hide (wparent);
3246 gtk_widget_hide (wscroll);
3247 }
3248 else
3249 {
3250 gtk_widget_show_all (wparent);
3251 gtk_widget_set_size_request (wscroll, width, height);
3252 }
3251 gtk_widget_queue_draw (wfixed); 3253 gtk_widget_queue_draw (wfixed);
3252 gdk_window_process_all_updates (); 3254 gdk_window_process_all_updates ();
3253 if (oldx != -1) 3255 if (oldx != -1 && oldw > 0 && oldh > 0)
3254 { 3256 {
3255 /* Clear under old scroll bar position. This must be done after 3257 /* Clear under old scroll bar position. This must be done after
3256 the gtk_widget_queue_draw and gdk_window_process_all_updates 3258 the gtk_widget_queue_draw and gdk_window_process_all_updates
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 602228f97be..4eba4710ea3 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -163,7 +163,6 @@ extern void xg_create_scroll_bar P_ ((FRAME_PTR f,
163 GCallback scroll_callback, 163 GCallback scroll_callback,
164 GCallback end_callback, 164 GCallback end_callback,
165 char *scroll_bar_name)); 165 char *scroll_bar_name));
166extern void xg_show_scroll_bar P_ ((int scrollbar_id));
167extern void xg_remove_scroll_bar P_ ((FRAME_PTR f, int scrollbar_id)); 166extern void xg_remove_scroll_bar P_ ((FRAME_PTR f, int scrollbar_id));
168 167
169extern void xg_update_scrollbar_pos P_ ((FRAME_PTR f, 168extern void xg_update_scrollbar_pos P_ ((FRAME_PTR f,
diff --git a/src/lread.c b/src/lread.c
index 3a77a62b27f..c73f7f32e51 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2683,7 +2683,17 @@ read1 (readcharfun, pch, first_in_list)
2683 } 2683 }
2684 2684
2685 case '`': 2685 case '`':
2686 if (first_in_list) 2686 /* Transition from old-style to new-style:
2687 If we see "(`" it used to mean old-style, which usually works
2688 fine because ` should almost never appear in such a position
2689 for new-style. But occasionally we need "(`" to mean new
2690 style, so we try to distinguish the two by the fact that we
2691 can either write "( `foo" or "(` foo", where the first
2692 intends to use new-style whereas the second intends to use
2693 old-style. For Emacs-25, we should completely remove this
2694 first_in_list exception (old-style can still be obtained via
2695 "(\`" anyway). */
2696 if (first_in_list && (c = READCHAR, UNREAD (c), c == ' '))
2687 { 2697 {
2688 Vold_style_backquotes = Qt; 2698 Vold_style_backquotes = Qt;
2689 goto default_label; 2699 goto default_label;
diff --git a/src/xdisp.c b/src/xdisp.c
index 7e1869bc963..7bb0b9063f9 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13490,14 +13490,22 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
13490 if (PT > CHARPOS (it.current.pos)) 13490 if (PT > CHARPOS (it.current.pos))
13491 { 13491 {
13492 int y0 = line_bottom_y (&it); 13492 int y0 = line_bottom_y (&it);
13493 13493 /* Compute how many pixels below window bottom to stop searching
13494 /* Compute the distance from the scroll margin to PT 13494 for PT. This avoids costly search for PT that is far away if
13495 (including the height of the cursor line). Moving the 13495 the user limited scrolling by a small number of lines, but
13496 iterator unconditionally to PT can be slow if PT is far 13496 always finds PT if scroll_conservatively is set to a large
13497 away, so stop 10 lines past the window bottom (is there a 13497 number, such as most-positive-fixnum. */
13498 way to do the right thing quickly?). */ 13498 int slack = max (scroll_max, 10 * FRAME_LINE_HEIGHT (f));
13499 move_it_to (&it, PT, -1, 13499 int y_to_move =
13500 it.last_visible_y + 10 * FRAME_LINE_HEIGHT (f), 13500 slack >= INT_MAX - it.last_visible_y
13501 ? INT_MAX
13502 : it.last_visible_y + slack;
13503
13504 /* Compute the distance from the scroll margin to PT or to
13505 the scroll limit, whichever comes first. This should
13506 include the height of the cursor line, to make that line
13507 fully visible. */
13508 move_it_to (&it, PT, -1, y_to_move,
13501 -1, MOVE_TO_POS | MOVE_TO_Y); 13509 -1, MOVE_TO_POS | MOVE_TO_Y);
13502 dy = line_bottom_y (&it) - y0; 13510 dy = line_bottom_y (&it) - y0;
13503 13511
@@ -13537,7 +13545,26 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
13537 return SCROLLING_FAILED; 13545 return SCROLLING_FAILED;
13538 13546
13539 start_display (&it, w, startp); 13547 start_display (&it, w, startp);
13540 move_it_vertically (&it, amount_to_scroll); 13548 if (scroll_max < INT_MAX)
13549 move_it_vertically (&it, amount_to_scroll);
13550 else
13551 {
13552 /* Extra precision for users who set scroll-conservatively
13553 to most-positive-fixnum: make sure the amount we scroll
13554 the window start is never less than amount_to_scroll,
13555 which was computed as distance from window bottom to
13556 point. This matters when lines at window top and lines
13557 below window bottom have different height. */
13558 struct it it1 = it;
13559 /* We use a temporary it1 because line_bottom_y can modify
13560 its argument, if it moves one line down; see there. */
13561 int start_y = line_bottom_y (&it1);
13562
13563 do {
13564 move_it_by_lines (&it, 1, 1);
13565 it1 = it;
13566 } while (line_bottom_y (&it1) - start_y < amount_to_scroll);
13567 }
13541 13568
13542 /* If STARTP is unchanged, move it down another screen line. */ 13569 /* If STARTP is unchanged, move it down another screen line. */
13543 if (CHARPOS (it.current.pos) == CHARPOS (startp)) 13570 if (CHARPOS (it.current.pos) == CHARPOS (startp))
diff --git a/src/xfns.c b/src/xfns.c
index 9072dabf355..963cd1ce0ca 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3064,8 +3064,8 @@ x_default_font_parameter (f, parms)
3064 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 3064 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
3065 Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL, 3065 Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
3066 RES_TYPE_STRING); 3066 RES_TYPE_STRING);
3067 Lisp_Object font; 3067 Lisp_Object font = Qnil;
3068 int got_from_gconf = 0; 3068 int got_from_system = 0;
3069 if (EQ (font_param, Qunbound)) 3069 if (EQ (font_param, Qunbound))
3070 font_param = Qnil; 3070 font_param = Qnil;
3071 3071
@@ -3075,14 +3075,20 @@ x_default_font_parameter (f, parms)
3075 regardless of font-use-system-font because .emacs may not have been 3075 regardless of font-use-system-font because .emacs may not have been
3076 read yet. */ 3076 read yet. */
3077 const char *system_font = xsettings_get_system_font (); 3077 const char *system_font = xsettings_get_system_font ();
3078 if (system_font) font_param = make_string (system_font, 3078 if (system_font)
3079 strlen (system_font)); 3079 {
3080 char *name = xstrdup (system_font);
3081 font = font_open_by_name (f, name);
3082 got_from_system = ! NILP (font);
3083 free (name);
3084 }
3080 } 3085 }
3081
3082 font = !NILP (font_param) ? font_param
3083 : x_get_arg (dpyinfo, parms, Qfont, "font", "Font", RES_TYPE_STRING);
3084 3086
3085 if (! STRINGP (font)) 3087 if (NILP (font))
3088 font = !NILP (font_param) ? font_param
3089 : x_get_arg (dpyinfo, parms, Qfont, "font", "Font", RES_TYPE_STRING);
3090
3091 if (! FONTP (font) && ! STRINGP (font))
3086 { 3092 {
3087 char *names[] 3093 char *names[]
3088 = { 3094 = {
@@ -3120,8 +3126,8 @@ x_default_font_parameter (f, parms)
3120 } 3126 }
3121 3127
3122 x_default_parameter (f, parms, Qfont, font, 3128 x_default_parameter (f, parms, Qfont, font,
3123 got_from_gconf ? NULL : "font", 3129 got_from_system ? NULL : "font",
3124 got_from_gconf ? NULL : "Font", 3130 got_from_system ? NULL : "Font",
3125 RES_TYPE_STRING); 3131 RES_TYPE_STRING);
3126} 3132}
3127 3133
diff --git a/src/xterm.c b/src/xterm.c
index 519ece2a2d3..ac6ee55954b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -5005,7 +5005,6 @@ x_scroll_bar_create (w, top, left, width, height)
5005 left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, 5005 left + VERTICAL_SCROLL_BAR_WIDTH_TRIM,
5006 width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, 5006 width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2,
5007 max (height, 1)); 5007 max (height, 1));
5008 xg_show_scroll_bar (bar->x_window);
5009#else /* not USE_GTK */ 5008#else /* not USE_GTK */
5010 Widget scroll_bar = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar); 5009 Widget scroll_bar = SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar);
5011 XtConfigureWidget (scroll_bar, 5010 XtConfigureWidget (scroll_bar,