aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2012-02-05 14:40:28 +0100
committerJoakim Verona2012-02-05 14:40:28 +0100
commit8c5c7f5afa968d06efb6788cf680d5463c389d85 (patch)
treea70876b87a7dbdcb936524880492f8fdc661fab0 /src
parentfbdce5fed745bc78911980466d9374d1101487fc (diff)
parent1ff980ae49715eb372acff8a193e36497a7665c4 (diff)
downloademacs-8c5c7f5afa968d06efb6788cf680d5463c389d85.tar.gz
emacs-8c5c7f5afa968d06efb6788cf680d5463c389d85.zip
ustream
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit38
-rw-r--r--src/ChangeLog78
-rw-r--r--src/callproc.c5
-rw-r--r--src/character.c24
-rw-r--r--src/dbusbind.c11
-rw-r--r--src/dispnew.c19
-rw-r--r--src/keyboard.c4
-rw-r--r--src/nsterm.m16
-rw-r--r--src/ralloc.c15
-rw-r--r--src/w32.c3
-rw-r--r--src/w32term.c4
-rw-r--r--src/xdisp.c8
-rw-r--r--src/xterm.c4
13 files changed, 148 insertions, 81 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index b60c14fe289..fc8eab6d1df 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -67,10 +67,7 @@ end
67# from calling OutputDebugString, which causes GDB to display each 67# from calling OutputDebugString, which causes GDB to display each
68# character twice (yuk!). 68# character twice (yuk!).
69define pr 69define pr
70 set $output_debug = print_output_debug_flag 70 pp $
71 set print_output_debug_flag = 0
72 set debug_print ($)
73 set print_output_debug_flag = $output_debug
74end 71end
75document pr 72document pr
76Print the emacs s-expression which is $. 73Print the emacs s-expression which is $.
@@ -90,48 +87,17 @@ Print the argument as an emacs s-expression
90Works only when an inferior emacs is executing. 87Works only when an inferior emacs is executing.
91end 88end
92 89
93# Print out s-expressions from tool bar
94define pp1
95 set $tmp = $arg0
96 set $output_debug = print_output_debug_flag
97 set print_output_debug_flag = 0
98 set safe_debug_print ($tmp)
99 set print_output_debug_flag = $output_debug
100end
101document pp1
102Print the argument as an emacs s-expression.
103Works only when an inferior emacs is executing.
104For use on tool bar when debugging in Emacs
105where the variable name would not otherwise
106be recorded in the GUD buffer.
107end
108
109# Print value of lisp variable 90# Print value of lisp variable
110define pv 91define pv
111 set $tmp = "$arg0" 92 set $tmp = "$arg0"
112 set $output_debug = print_output_debug_flag 93 set $output_debug = print_output_debug_flag
113 set print_output_debug_flag = 0 94 set print_output_debug_flag = 0
114 set safe_debug_print ( find_symbol_value (intern ($tmp)))
115 set print_output_debug_flag = $output_debug
116end
117document pv
118Print the value of the lisp variable given as argument.
119Works only when an inferior emacs is executing.
120end
121
122# Print value of lisp variable
123define pv1
124 set $tmp = "$arg0"
125 set $output_debug = print_output_debug_flag
126 set print_output_debug_flag = 0
127 set safe_debug_print (find_symbol_value (intern ($tmp))) 95 set safe_debug_print (find_symbol_value (intern ($tmp)))
128 set print_output_debug_flag = $output_debug 96 set print_output_debug_flag = $output_debug
129end 97end
130document pv1 98document pv
131Print the value of the lisp variable given as argument. 99Print the value of the lisp variable given as argument.
132Works only when an inferior emacs is executing. 100Works only when an inferior emacs is executing.
133For use when debugging in Emacs where the variable
134name would not otherwise be recorded in the GUD buffer.
135end 101end
136 102
137# Print out current buffer point and boundaries 103# Print out current buffer point and boundaries
diff --git a/src/ChangeLog b/src/ChangeLog
index 89fa90d9f92..2353cc1eca2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,76 @@
12012-02-04 Andreas Schwab <schwab@linux-m68k.org>
2
3 * .gdbinit (pp1, pv1): Remove redundant defines.
4 (pr): Use pp.
5
62012-02-04 Chong Yidong <cyd@gnu.org>
7
8 * nsterm.m: Declare a global (Bug#10694).
9
102012-02-04 Eli Zaretskii <eliz@gnu.org>
11
12 * w32.c (get_emacs_configuration_options): Include
13 --enable-checking, if specified, in the return value.
14
152012-02-04 Martin Rudalics <rudalics@gmx.at>
16
17 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
18 after rounding frame sizes. (Bug#9723)
19
202012-02-04 Eli Zaretskii <eliz@gnu.org>
21
22 * keyboard.c (adjust_point_for_property): Don't position point
23 before BEGV. (Bug#10696)
24
252012-02-03 Paul Eggert <eggert@cs.ucla.edu>
26
27 Handle overflow when computing char display width (Bug#9496).
28 * character.c (char_width): Return EMACS_INT, not int.
29 (char_width, c_string_width): Check for overflow when
30 computing the width; this is possible now that individual
31 characters can have unbounded width. Problem introduced
32 by merge from Emacs 23 on 2012-01-19.
33
342012-02-02 Michael Albinus <michael.albinus@gmx.de>
35
36 * dbusbind.c (Fdbus_register_method): Mention the return value
37 :ignore in the docstring.
38
392012-02-02 Glenn Morris <rgm@gnu.org>
40
41 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
42
43 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
44 Unconditionally set to t. (Bug#10673)
45 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
46 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
47 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
48
492012-02-02 Kenichi Handa <handa@m17n.org>
50
51 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
52 0, do not call append_composite_glyph.
53
542012-02-02 Kenichi Handa <handa@m17n.org>
55
56 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
57 NULL (Bug#6988).
58 (x_produce_glyphs): If the component of a composition is a null
59 string, set it->pixel_width to 1 to avoid zero-width glyph.
60
612012-02-01 Eli Zaretskii <eliz@gnu.org>
62
63 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
64 first 2 arguments are identical. This makes inserting large
65 output from a subprocess an order of magnitude faster on
66 MS-Windows, where all sbrk'ed memory is always contiguous.
67
682012-01-31 Glenn Morris <rgm@gnu.org>
69
70 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
71 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
72 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
73
12012-01-29 Glenn Morris <rgm@gnu.org> 742012-01-29 Glenn Morris <rgm@gnu.org>
2 75
3 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS). 76 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
@@ -8,7 +81,6 @@
8 81
92012-01-28 Chong Yidong <cyd@gnu.org> 822012-01-28 Chong Yidong <cyd@gnu.org>
10 83
11
12 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550). 84 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
13 85
142012-01-26 Chong Yidong <cyd@gnu.org> 862012-01-26 Chong Yidong <cyd@gnu.org>
@@ -2363,7 +2435,7 @@
2363 Remove unreachable code. 2435 Remove unreachable code.
2364 (read_hex, load_charset_map_from_file): Check for integer overflow. 2436 (read_hex, load_charset_map_from_file): Check for integer overflow.
2365 2437
2366 * xterm.c: don't go over XClientMessageEvent limit 2438 * xterm.c: Don't go over XClientMessageEvent limit.
2367 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed. 2439 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
2368 (x_send_scroll_bar_event): Likewise. Check that the size does not 2440 (x_send_scroll_bar_event): Likewise. Check that the size does not
2369 exceed limits imposed by XClientMessageEvent, as well as the usual 2441 exceed limits imposed by XClientMessageEvent, as well as the usual
@@ -5654,7 +5726,7 @@
5654 5726
5655 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'. 5727 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
5656 5728
5657 ccl: add integer overflow checks 5729 ccl: Add integer overflow checks.
5658 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT): 5730 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
5659 (IN_INT_RANGE): New macros. 5731 (IN_INT_RANGE): New macros.
5660 (ccl_driver): Use them to check for integer overflow when 5732 (ccl_driver): Use them to check for integer overflow when
diff --git a/src/callproc.c b/src/callproc.c
index c5208fb93d9..b5b8cadeb68 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -164,7 +164,8 @@ The remaining arguments are optional.
164The program's input comes from file INFILE (nil means `/dev/null'). 164The program's input comes from file INFILE (nil means `/dev/null').
165Insert output in BUFFER before point; t means current buffer; nil for BUFFER 165Insert output in BUFFER before point; t means current buffer; nil for BUFFER
166 means discard it; 0 means discard and don't wait; and `(:file FILE)', where 166 means discard it; 0 means discard and don't wait; and `(:file FILE)', where
167 FILE is a file name string, means that it should be written to that file. 167 FILE is a file name string, means that it should be written to that file
168 \(if the file already exists it is overwritten).
168BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case, 169BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
169REAL-BUFFER says what to do with standard output, as above, 170REAL-BUFFER says what to do with standard output, as above,
170while STDERR-FILE says what to do with standard error in the child. 171while STDERR-FILE says what to do with standard error in the child.
@@ -940,7 +941,7 @@ Delete the text if fourth arg DELETE is non-nil.
940Insert output in BUFFER before point; t means current buffer; nil for 941Insert output in BUFFER before point; t means current buffer; nil for
941 BUFFER means discard it; 0 means discard and don't wait; and `(:file 942 BUFFER means discard it; 0 means discard and don't wait; and `(:file
942 FILE)', where FILE is a file name string, means that it should be 943 FILE)', where FILE is a file name string, means that it should be
943 written to that file. 944 written to that file (if the file already exists it is overwritten).
944BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case, 945BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
945REAL-BUFFER says what to do with standard output, as above, 946REAL-BUFFER says what to do with standard output, as above,
946while STDERR-FILE says what to do with standard error in the child. 947while STDERR-FILE says what to do with standard error in the child.
diff --git a/src/character.c b/src/character.c
index 593fbcece0b..82bc2bfef4e 100644
--- a/src/character.c
+++ b/src/character.c
@@ -311,10 +311,10 @@ If the multibyte character does not represent a byte, return -1. */)
311 311
312/* Return width (columns) of C considering the buffer display table DP. */ 312/* Return width (columns) of C considering the buffer display table DP. */
313 313
314static int 314static EMACS_INT
315char_width (int c, struct Lisp_Char_Table *dp) 315char_width (int c, struct Lisp_Char_Table *dp)
316{ 316{
317 int width = CHAR_WIDTH (c); 317 EMACS_INT width = CHAR_WIDTH (c);
318 318
319 if (dp) 319 if (dp)
320 { 320 {
@@ -326,7 +326,12 @@ char_width (int c, struct Lisp_Char_Table *dp)
326 { 326 {
327 ch = AREF (disp, i); 327 ch = AREF (disp, i);
328 if (CHARACTERP (ch)) 328 if (CHARACTERP (ch))
329 width += CHAR_WIDTH (XFASTINT (ch)); 329 {
330 int w = CHAR_WIDTH (XFASTINT (ch));
331 if (INT_ADD_OVERFLOW (width, w))
332 string_overflow ();
333 width += w;
334 }
330 } 335 }
331 } 336 }
332 return width; 337 return width;
@@ -340,7 +345,8 @@ Tab is taken to occupy `tab-width' columns.
340usage: (char-width CHAR) */) 345usage: (char-width CHAR) */)
341 (Lisp_Object ch) 346 (Lisp_Object ch)
342{ 347{
343 int c, width; 348 int c;
349 EMACS_INT width;
344 350
345 CHECK_CHARACTER (ch); 351 CHECK_CHARACTER (ch);
346 c = XINT (ch); 352 c = XINT (ch);
@@ -367,10 +373,14 @@ c_string_width (const unsigned char *str, EMACS_INT len, int precision,
367 { 373 {
368 int bytes; 374 int bytes;
369 int c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes); 375 int c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes);
370 int thiswidth = char_width (c, dp); 376 EMACS_INT thiswidth = char_width (c, dp);
371 377
372 if (precision > 0 378 if (precision <= 0)
373 && (width + thiswidth > precision)) 379 {
380 if (INT_ADD_OVERFLOW (width, thiswidth))
381 string_overflow ();
382 }
383 else if (precision - width < thiswidth)
374 { 384 {
375 *nchars = i; 385 *nchars = i;
376 *nbytes = i_byte; 386 *nbytes = i_byte;
diff --git a/src/dbusbind.c b/src/dbusbind.c
index c89867fbae6..ad1a3f3cbe8 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -2162,10 +2162,13 @@ DONT-REGISTER-SERVICE below).
2162 2162
2163PATH is the D-Bus object path SERVICE is registered (See discussion of 2163PATH is the D-Bus object path SERVICE is registered (See discussion of
2164DONT-REGISTER-SERVICE below). INTERFACE is the interface offered by 2164DONT-REGISTER-SERVICE below). INTERFACE is the interface offered by
2165SERVICE. It must provide METHOD. HANDLER is a Lisp function to be 2165SERVICE. It must provide METHOD.
2166called when a method call is received. It must accept the input 2166
2167arguments of METHOD. The return value of HANDLER is used for 2167HANDLER is a Lisp function to be called when a method call is
2168composing the returning D-Bus message. 2168received. It must accept the input arguments of METHOD. The return
2169value of HANDLER is used for composing the returning D-Bus message.
2170In case HANDLER shall return a reply message with an empty argument
2171list, HANDLER must return the symbol `:ignore'.
2169 2172
2170When DONT-REGISTER-SERVICE is non-nil, the known name SERVICE is not 2173When DONT-REGISTER-SERVICE is non-nil, the known name SERVICE is not
2171registered. This means that other D-Bus clients have no way of 2174registered. This means that other D-Bus clients have no way of
diff --git a/src/dispnew.c b/src/dispnew.c
index 88de7361735..d2c2668864e 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5774,19 +5774,22 @@ change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int
5774 if (newwidth == 0) 5774 if (newwidth == 0)
5775 newwidth = FRAME_COLS (f); 5775 newwidth = FRAME_COLS (f);
5776 5776
5777 /* Compute width of windows in F. 5777 /* Compute width of windows in F. */
5778 This is the width of the frame without vertical scroll bars. */
5779 new_frame_total_cols = FRAME_TOTAL_COLS_ARG (f, newwidth);
5780
5781 /* Round up to the smallest acceptable size. */ 5778 /* Round up to the smallest acceptable size. */
5782 check_frame_size (f, &newheight, &newwidth); 5779 check_frame_size (f, &newheight, &newwidth);
5783 5780
5781 /* This is the width of the frame with vertical scroll bars and fringe
5782 columns. Do this after rounding - see discussion of bug#9723. */
5783 new_frame_total_cols = FRAME_TOTAL_COLS_ARG (f, newwidth);
5784
5784 /* If we're not changing the frame size, quit now. */ 5785 /* If we're not changing the frame size, quit now. */
5785 /* Frame width may be unchanged but the text portion may change, for example, 5786 /* Frame width may be unchanged but the text portion may change, for
5786 fullscreen and remove/add scroll bar. */ 5787 example, fullscreen and remove/add scroll bar. */
5787 if (newheight == FRAME_LINES (f) 5788 if (newheight == FRAME_LINES (f)
5788 && newwidth == FRAME_COLS (f) // text portion unchanged 5789 /* Text portion unchanged? */
5789 && new_frame_total_cols == FRAME_TOTAL_COLS (f)) // frame width unchanged 5790 && newwidth == FRAME_COLS (f)
5791 /* Frame width unchanged? */
5792 && new_frame_total_cols == FRAME_TOTAL_COLS (f))
5790 return; 5793 return;
5791 5794
5792 BLOCK_INPUT; 5795 BLOCK_INPUT;
diff --git a/src/keyboard.c b/src/keyboard.c
index 87103177eab..8b17c32bf36 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1752,7 +1752,9 @@ adjust_point_for_property (EMACS_INT last_pt, int modified)
1752 { 1752 {
1753 xassert (end > PT); 1753 xassert (end > PT);
1754 SET_PT (PT < last_pt 1754 SET_PT (PT < last_pt
1755 ? (STRINGP (val) && SCHARS (val) == 0 ? beg - 1 : beg) 1755 ? (STRINGP (val) && SCHARS (val) == 0
1756 ? max (beg - 1, BEGV)
1757 : beg)
1756 : end); 1758 : end);
1757 check_composition = check_invisible = 1; 1759 check_composition = check_invisible = 1;
1758 } 1760 }
diff --git a/src/nsterm.m b/src/nsterm.m
index 70d3cc0e8b8..a45792fd645 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1,6 +1,7 @@
1/* NeXT/Open/GNUstep / MacOSX communication module. 1/* NeXT/Open/GNUstep / MacOSX communication module.
2 Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2012 2
3 Free Software Foundation, Inc. 3Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2012
4 Free Software Foundation, Inc.
4 5
5This file is part of GNU Emacs. 6This file is part of GNU Emacs.
6 7
@@ -64,6 +65,7 @@ int term_trace_num = 0;
64#define NSTRACE(x) 65#define NSTRACE(x)
65#endif 66#endif
66 67
68extern NSString *NSMenuDidBeginTrackingNotification;
67 69
68/* ========================================================================== 70/* ==========================================================================
69 71
@@ -6735,12 +6737,12 @@ Only works on OSX 10.6 or later. */);
6735 6737
6736 /* TODO: move to common code */ 6738 /* TODO: move to common code */
6737 DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, 6739 DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars,
6738 doc: /* If not nil, Emacs uses toolkit scroll bars. */); 6740 doc: /* Which toolkit scroll bars Emacs uses, if any.
6739#ifdef USE_TOOLKIT_SCROLL_BARS 6741A value of nil means Emacs doesn't use toolkit scroll bars.
6742With the X Window system, the value is a symbol describing the
6743X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
6744With MS Windows or Nextstep, the value is t. */);
6740 Vx_toolkit_scroll_bars = Qt; 6745 Vx_toolkit_scroll_bars = Qt;
6741#else
6742 Vx_toolkit_scroll_bars = Qnil;
6743#endif
6744 6746
6745 DEFVAR_BOOL ("x-use-underline-position-properties", 6747 DEFVAR_BOOL ("x-use-underline-position-properties",
6746 x_use_underline_position_properties, 6748 x_use_underline_position_properties,
diff --git a/src/ralloc.c b/src/ralloc.c
index 13587b9ffd4..896ad9f3155 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -636,7 +636,8 @@ resize_bloc (bloc_ptr bloc, SIZE size)
636 } 636 }
637 else 637 else
638 { 638 {
639 memmove (b->new_data, b->data, b->size); 639 if (b->new_data != b->data)
640 memmove (b->new_data, b->data, b->size);
640 *b->variable = b->data = b->new_data; 641 *b->variable = b->data = b->new_data;
641 } 642 }
642 } 643 }
@@ -647,7 +648,8 @@ resize_bloc (bloc_ptr bloc, SIZE size)
647 } 648 }
648 else 649 else
649 { 650 {
650 memmove (bloc->new_data, bloc->data, old_size); 651 if (bloc->new_data != bloc->data)
652 memmove (bloc->new_data, bloc->data, old_size);
651 memset ((char *) bloc->new_data + old_size, 0, size - old_size); 653 memset ((char *) bloc->new_data + old_size, 0, size - old_size);
652 *bloc->variable = bloc->data = bloc->new_data; 654 *bloc->variable = bloc->data = bloc->new_data;
653 } 655 }
@@ -663,7 +665,8 @@ resize_bloc (bloc_ptr bloc, SIZE size)
663 } 665 }
664 else 666 else
665 { 667 {
666 memmove (b->new_data, b->data, b->size); 668 if (b->new_data != b->data)
669 memmove (b->new_data, b->data, b->size);
667 *b->variable = b->data = b->new_data; 670 *b->variable = b->data = b->new_data;
668 } 671 }
669 } 672 }
@@ -816,7 +819,8 @@ r_alloc_sbrk (long int size)
816 header. */ 819 header. */
817 for (b = last_bloc; b != NIL_BLOC; b = b->prev) 820 for (b = last_bloc; b != NIL_BLOC; b = b->prev)
818 { 821 {
819 memmove (b->new_data, b->data, b->size); 822 if (b->new_data != b->data)
823 memmove (b->new_data, b->data, b->size);
820 *b->variable = b->data = b->new_data; 824 *b->variable = b->data = b->new_data;
821 } 825 }
822 826
@@ -862,7 +866,8 @@ r_alloc_sbrk (long int size)
862 866
863 for (b = first_bloc; b != NIL_BLOC; b = b->next) 867 for (b = first_bloc; b != NIL_BLOC; b = b->next)
864 { 868 {
865 memmove (b->new_data, b->data, b->size); 869 if (b->new_data != b->data)
870 memmove (b->new_data, b->data, b->size);
866 *b->variable = b->data = b->new_data; 871 *b->variable = b->data = b->new_data;
867 } 872 }
868 } 873 }
diff --git a/src/w32.c b/src/w32.c
index f610a36ecf4..3d3d33453c6 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1940,6 +1940,9 @@ get_emacs_configuration_options (void)
1940#ifdef EMACSDEBUG 1940#ifdef EMACSDEBUG
1941 " --no-opt", 1941 " --no-opt",
1942#endif 1942#endif
1943#ifdef ENABLE_CHECKING
1944 " --enable-checking",
1945#endif
1943 /* configure.bat already sets USER_CFLAGS and USER_LDFLAGS 1946 /* configure.bat already sets USER_CFLAGS and USER_LDFLAGS
1944 with a starting space to save work here. */ 1947 with a starting space to save work here. */
1945#ifdef USER_CFLAGS 1948#ifdef USER_CFLAGS
diff --git a/src/w32term.c b/src/w32term.c
index f764ad9d218..8a0e9efc943 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1,6 +1,6 @@
1/* Implementation of GUI terminal on the Microsoft W32 API. 1/* Implementation of GUI terminal on the Microsoft W32 API.
2 2
3Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc. 3Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -6432,7 +6432,7 @@ baseline level. The default value is nil. */);
6432A value of nil means Emacs doesn't use toolkit scroll bars. 6432A value of nil means Emacs doesn't use toolkit scroll bars.
6433With the X Window system, the value is a symbol describing the 6433With the X Window system, the value is a symbol describing the
6434X toolkit. Possible values are: gtk, motif, xaw, or xaw3d. 6434X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
6435With MS Windows, the value is t. */); 6435With MS Windows or Nextstep, the value is t. */);
6436 Vx_toolkit_scroll_bars = Qt; 6436 Vx_toolkit_scroll_bars = Qt;
6437 6437
6438 staticpro (&last_mouse_motion_frame); 6438 staticpro (&last_mouse_motion_frame);
diff --git a/src/xdisp.c b/src/xdisp.c
index 87aedabd757..653ca46904b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -22878,7 +22878,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
22878 ptrdiff_t cmp_id = (row)->glyphs[area][START].u.cmp.id; \ 22878 ptrdiff_t cmp_id = (row)->glyphs[area][START].u.cmp.id; \
22879 struct composition *cmp = composition_table[cmp_id]; \ 22879 struct composition *cmp = composition_table[cmp_id]; \
22880 XChar2b *char2b; \ 22880 XChar2b *char2b; \
22881 struct glyph_string *first_s IF_LINT (= NULL); \ 22881 struct glyph_string *first_s = NULL; \
22882 int n; \ 22882 int n; \
22883 \ 22883 \
22884 char2b = (XChar2b *) alloca ((sizeof *char2b) * cmp->glyph_len); \ 22884 char2b = (XChar2b *) alloca ((sizeof *char2b) * cmp->glyph_len); \
@@ -24628,7 +24628,7 @@ x_produce_glyphs (struct it *it)
24628 /* Initialize the bounding box. */ 24628 /* Initialize the bounding box. */
24629 if (pcm) 24629 if (pcm)
24630 { 24630 {
24631 width = pcm->width; 24631 width = cmp->glyph_len > 0 ? pcm->width : 0;
24632 ascent = pcm->ascent; 24632 ascent = pcm->ascent;
24633 descent = pcm->descent; 24633 descent = pcm->descent;
24634 lbearing = pcm->lbearing; 24634 lbearing = pcm->lbearing;
@@ -24636,7 +24636,7 @@ x_produce_glyphs (struct it *it)
24636 } 24636 }
24637 else 24637 else
24638 { 24638 {
24639 width = font->space_width; 24639 width = cmp->glyph_len > 0 ? font->space_width : 0;
24640 ascent = FONT_BASE (font); 24640 ascent = FONT_BASE (font);
24641 descent = FONT_DESCENT (font); 24641 descent = FONT_DESCENT (font);
24642 lbearing = 0; 24642 lbearing = 0;
@@ -24854,7 +24854,7 @@ x_produce_glyphs (struct it *it)
24854 if (it->descent < 0) 24854 if (it->descent < 0)
24855 it->descent = 0; 24855 it->descent = 0;
24856 24856
24857 if (it->glyph_row) 24857 if (it->glyph_row && cmp->glyph_len > 0)
24858 append_composite_glyph (it); 24858 append_composite_glyph (it);
24859 } 24859 }
24860 else if (it->what == IT_COMPOSITION) 24860 else if (it->what == IT_COMPOSITION)
diff --git a/src/xterm.c b/src/xterm.c
index 7b9feeb9364..3581ea61eb2 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1,6 +1,6 @@
1/* X Communication module for terminals which understand the X protocol. 1/* X Communication module for terminals which understand the X protocol.
2 2
3Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc. 3Copyright (C) 1989, 1993-2012 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -10862,7 +10862,7 @@ selected window or cursor position is preserved. */);
10862A value of nil means Emacs doesn't use toolkit scroll bars. 10862A value of nil means Emacs doesn't use toolkit scroll bars.
10863With the X Window system, the value is a symbol describing the 10863With the X Window system, the value is a symbol describing the
10864X toolkit. Possible values are: gtk, motif, xaw, or xaw3d. 10864X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
10865With MS Windows, the value is t. */); 10865With MS Windows or Nextstep, the value is t. */);
10866#ifdef USE_TOOLKIT_SCROLL_BARS 10866#ifdef USE_TOOLKIT_SCROLL_BARS
10867#ifdef USE_MOTIF 10867#ifdef USE_MOTIF
10868 Vx_toolkit_scroll_bars = intern_c_string ("motif"); 10868 Vx_toolkit_scroll_bars = intern_c_string ("motif");