aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2014-01-29 22:39:00 +0900
committerKenichi Handa2014-01-29 22:39:00 +0900
commit908df335d0ccb2779f23c695f355a9939fe07bf2 (patch)
tree1cf4f8d633364c4833ed37d286104d8e4f7c8b0f /src
parent52840a9cc870d3e8946b6edebe2b0a0a23d23cec (diff)
parent5442c6cebbf80898f83d211d5b0d34cbfb289490 (diff)
downloademacs-908df335d0ccb2779f23c695f355a9939fe07bf2.tar.gz
emacs-908df335d0ccb2779f23c695f355a9939fe07bf2.zip
merge trunk
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog33
-rw-r--r--src/data.c6
-rw-r--r--src/lread.c3
-rw-r--r--src/terminal.c11
-rw-r--r--src/w32fns.c2
-rw-r--r--src/xdisp.c16
-rw-r--r--src/xfaces.c3
-rw-r--r--src/xmenu.c2
8 files changed, 56 insertions, 20 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index aa3a65ccb60..04f5f0d6bbe 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -11,6 +11,39 @@
11 11
12 * fileio.c (Finsert_file_contents): Cancel the previous change. 12 * fileio.c (Finsert_file_contents): Cancel the previous change.
13 13
142014-01-29 Martin Rudalics <rudalics@gmx.at>
15
16 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
17 that are not visible.
18
192014-01-29 Jan Djärv <jan.h.d@swipnet.se>
20
21 * xmenu.c (create_and_show_popup_menu): Handle case when no key
22 is grabbed (Bug#16565).
23
242014-01-28 Martin Rudalics <rudalics@gmx.at>
25
26 * xdisp.c (last_max_ascent): Re-remove after erroneously
27 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
28 from 2013-03-29.
29 (move_it_to): Re-remove reference to last_max_ascent.
30 (Fwindow_text_pixel_size): Add iterator's max_ascent and
31 max_descent here instead of calling line_bottom_y. Fix
32 doc-string.
33
342014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
35
36 * terminal.c (initial_free_frame_resources): New function.
37 (init_initial_terminal): Install new hook to free face cache
38 on initial frame and avoid memory leak. For details, see
39 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
40 * xfaces.c (free_frame_faces): Adjust comment.
41
422014-01-26 Paul Eggert <eggert@cs.ucla.edu>
43
44 * data.c (Fstring_to_number): Document results if unparsable
45 (Bug#16551).
46
142014-01-26 Jan Djärv <jan.h.d@swipnet.se> 472014-01-26 Jan Djärv <jan.h.d@swipnet.se>
15 48
16 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540) 49 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
diff --git a/src/data.c b/src/data.c
index 2a64c1bbf82..91a1d8b75fb 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2523,12 +2523,12 @@ NUMBER may be an integer or a floating point number. */)
2523 2523
2524DEFUN ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0, 2524DEFUN ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0,
2525 doc: /* Parse STRING as a decimal number and return the number. 2525 doc: /* Parse STRING as a decimal number and return the number.
2526This parses both integers and floating point numbers. 2526Ignore leading spaces and tabs, and all trailing chars. Return 0 if
2527It ignores leading spaces and tabs, and all trailing chars. 2527STRING cannot be parsed as an integer or floating point number.
2528 2528
2529If BASE, interpret STRING as a number in that base. If BASE isn't 2529If BASE, interpret STRING as a number in that base. If BASE isn't
2530present, base 10 is used. BASE must be between 2 and 16 (inclusive). 2530present, base 10 is used. BASE must be between 2 and 16 (inclusive).
2531If the base used is not 10, STRING is always parsed as integer. */) 2531If the base used is not 10, STRING is always parsed as an integer. */)
2532 (register Lisp_Object string, Lisp_Object base) 2532 (register Lisp_Object string, Lisp_Object base)
2533{ 2533{
2534 register char *p; 2534 register char *p;
diff --git a/src/lread.c b/src/lread.c
index d6118d0a4e3..635862f2654 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3938,7 +3938,8 @@ OBARRAY defaults to the value of the variable `obarray'. */)
3938 3938
3939/* Return the symbol in OBARRAY whose names matches the string 3939/* Return the symbol in OBARRAY whose names matches the string
3940 of SIZE characters (SIZE_BYTE bytes) at PTR. 3940 of SIZE characters (SIZE_BYTE bytes) at PTR.
3941 If there is no such symbol in OBARRAY, return nil. 3941 If there is no such symbol, return the integer bucket number of
3942 where the symbol would be if it were present.
3942 3943
3943 Also store the bucket number in oblookup_last_bucket_number. */ 3944 Also store the bucket number in oblookup_last_bucket_number. */
3944 3945
diff --git a/src/terminal.c b/src/terminal.c
index 15e7e8a4474..d0a38b97bb4 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -500,7 +500,15 @@ selected frame's terminal). */)
500 return store_terminal_param (t, parameter, value); 500 return store_terminal_param (t, parameter, value);
501} 501}
502 502
503 503/* Initial frame has no device-dependent output data, but has
504 face cache which should be freed when the frame is deleted. */
505
506static void
507initial_free_frame_resources (struct frame *f)
508{
509 eassert (FRAME_INITIAL_P (f));
510 free_frame_faces (f);
511}
504 512
505/* Create the bootstrap display terminal for the initial frame. 513/* Create the bootstrap display terminal for the initial frame.
506 Returns a terminal of type output_initial. */ 514 Returns a terminal of type output_initial. */
@@ -516,6 +524,7 @@ init_initial_terminal (void)
516 initial_terminal->name = xstrdup ("initial_terminal"); 524 initial_terminal->name = xstrdup ("initial_terminal");
517 initial_terminal->kboard = initial_kboard; 525 initial_terminal->kboard = initial_kboard;
518 initial_terminal->delete_terminal_hook = &delete_initial_terminal; 526 initial_terminal->delete_terminal_hook = &delete_initial_terminal;
527 initial_terminal->delete_frame_hook = &initial_free_frame_resources;
519 /* All other hooks are NULL. */ 528 /* All other hooks are NULL. */
520 529
521 return initial_terminal; 530 return initial_terminal;
diff --git a/src/w32fns.c b/src/w32fns.c
index 8d64af5b93d..98456cd20d4 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1713,7 +1713,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1713 /* If the tool bar gets smaller, the internal border below it 1713 /* If the tool bar gets smaller, the internal border below it
1714 has to be cleared. It was formerly part of the display 1714 has to be cleared. It was formerly part of the display
1715 of the larger tool bar, and updating windows won't clear it. */ 1715 of the larger tool bar, and updating windows won't clear it. */
1716 if (FRAME_INTERNAL_BORDER_WIDTH (f) != 0) 1716 if (FRAME_INTERNAL_BORDER_WIDTH (f) != 0 && FRAME_VISIBLE_P (f))
1717 { 1717 {
1718 int height = FRAME_INTERNAL_BORDER_WIDTH (f); 1718 int height = FRAME_INTERNAL_BORDER_WIDTH (f);
1719 int width = FRAME_PIXEL_WIDTH (f); 1719 int width = FRAME_PIXEL_WIDTH (f);
diff --git a/src/xdisp.c b/src/xdisp.c
index 7717f1c2861..b5dec35568a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -571,7 +571,7 @@ static struct glyph scratch_glyphs[MAX_SCRATCH_GLYPHS];
571 571
572/* Ascent and height of the last line processed by move_it_to. */ 572/* Ascent and height of the last line processed by move_it_to. */
573 573
574static int last_max_ascent, last_height; 574static int last_height;
575 575
576/* Non-zero if there's a help-echo in the echo area. */ 576/* Non-zero if there's a help-echo in the echo area. */
577 577
@@ -9099,7 +9099,6 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos
9099 it->current_y += it->max_ascent + it->max_descent; 9099 it->current_y += it->max_ascent + it->max_descent;
9100 ++it->vpos; 9100 ++it->vpos;
9101 last_height = it->max_ascent + it->max_descent; 9101 last_height = it->max_ascent + it->max_descent;
9102 last_max_ascent = it->max_ascent;
9103 it->max_ascent = it->max_descent = 0; 9102 it->max_ascent = it->max_descent = 0;
9104 } 9103 }
9105 9104
@@ -9126,7 +9125,6 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos
9126 it->current_y += it->max_ascent + it->max_descent; 9125 it->current_y += it->max_ascent + it->max_descent;
9127 ++it->vpos; 9126 ++it->vpos;
9128 last_height = it->max_ascent + it->max_descent; 9127 last_height = it->max_ascent + it->max_descent;
9129 last_max_ascent = it->max_ascent;
9130 } 9128 }
9131 9129
9132 if (backup_data) 9130 if (backup_data)
@@ -9511,7 +9509,7 @@ Optional argument MODE_AND_HEADER_LINE nil or omitted means do not
9511include the height of the mode- or header-line of WINDOW in the return 9509include the height of the mode- or header-line of WINDOW in the return
9512value. If it is either the symbol `mode-line' or `header-line', include 9510value. If it is either the symbol `mode-line' or `header-line', include
9513only the height of that line, if present, in the return value. If t, 9511only the height of that line, if present, in the return value. If t,
9514include the height of any of these lines in the return value. */) 9512include the height of both, if present, in the return value. */)
9515 (Lisp_Object window, Lisp_Object from, Lisp_Object to, Lisp_Object x_limit, Lisp_Object y_limit, 9513 (Lisp_Object window, Lisp_Object from, Lisp_Object to, Lisp_Object x_limit, Lisp_Object y_limit,
9516 Lisp_Object mode_and_header_line) 9514 Lisp_Object mode_and_header_line)
9517{ 9515{
@@ -9579,7 +9577,6 @@ include the height of any of these lines in the return value. */)
9579 SET_TEXT_POS (startp, start, CHAR_TO_BYTE (start)); 9577 SET_TEXT_POS (startp, start, CHAR_TO_BYTE (start));
9580 start_display (&it, w, startp); 9578 start_display (&it, w, startp);
9581 9579
9582 /** move_it_vertically_backward (&it, 0); **/
9583 if (NILP (x_limit)) 9580 if (NILP (x_limit))
9584 x = move_it_to (&it, end, -1, max_y, -1, MOVE_TO_POS | MOVE_TO_Y); 9581 x = move_it_to (&it, end, -1, max_y, -1, MOVE_TO_POS | MOVE_TO_Y);
9585 else 9582 else
@@ -9593,14 +9590,7 @@ include the height of any of these lines in the return value. */)
9593 MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); 9590 MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
9594 } 9591 }
9595 9592
9596 if (start == end) 9593 y = it.current_y + it.max_ascent + it.max_descent;
9597 y = it.current_y;
9598 else
9599 {
9600 /* Count last line. */
9601 last_height = 0;
9602 y = line_bottom_y (&it); /* - y; */
9603 }
9604 9594
9605 if (!EQ (mode_and_header_line, Qheader_line) 9595 if (!EQ (mode_and_header_line, Qheader_line)
9606 && !EQ (mode_and_header_line, Qt)) 9596 && !EQ (mode_and_header_line, Qt))
diff --git a/src/xfaces.c b/src/xfaces.c
index 4321eb3dd8c..f2d777a12b1 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -694,7 +694,8 @@ init_frame_faces (struct frame *f)
694} 694}
695 695
696 696
697/* Free face cache of frame F. Called from delete_frame. */ 697/* Free face cache of frame F. Called from frame-dependent
698 resource freeing function, e.g. (x|tty)_free_frame_resources. */
698 699
699void 700void
700free_frame_faces (struct frame *f) 701free_frame_faces (struct frame *f)
diff --git a/src/xmenu.c b/src/xmenu.c
index 6f628527a6d..c101d9f5975 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1306,6 +1306,8 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
1306 for (i = 0; i < 5; i++) 1306 for (i = 0; i < 5; i++)
1307 if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i)) 1307 if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i))
1308 break; 1308 break;
1309 // If keys aren't grabbed (i.e. a mouse up event), use 0.
1310 if (i == 5) i = 0;
1309 } 1311 }
1310 1312
1311 /* Display the menu. */ 1313 /* Display the menu. */