aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2012-02-10 10:58:48 -0800
committerPaul Eggert2012-02-10 10:58:48 -0800
commit6e6c82a4e687708d5a7a3887f92db45bd74da276 (patch)
tree85dc3105240e84a8cddadb25d572e170fcdbd8bc /src
parent78df1fb1d46d556bfc2698ca1802972b13613ba8 (diff)
parentcc26d239af9a82cff079556a1daff4b4bf60eb5c (diff)
downloademacs-6e6c82a4e687708d5a7a3887f92db45bd74da276.tar.gz
emacs-6e6c82a4e687708d5a7a3887f92db45bd74da276.zip
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit38
-rw-r--r--src/ChangeLog160
-rw-r--r--src/buffer.c14
-rw-r--r--src/callproc.c5
-rw-r--r--src/character.c79
-rw-r--r--src/coding.c10
-rw-r--r--src/dbusbind.c11
-rw-r--r--src/dispnew.c19
-rw-r--r--src/doc.c6
-rw-r--r--src/eval.c15
-rw-r--r--src/floatfns.c2
-rw-r--r--src/fns.c15
-rw-r--r--src/gnutls.c5
-rw-r--r--src/image.c23
-rw-r--r--src/keyboard.c29
-rw-r--r--src/lread.c3
-rw-r--r--src/minibuf.c22
-rw-r--r--src/nsterm.m16
-rw-r--r--src/process.c10
-rw-r--r--src/ralloc.c15
-rw-r--r--src/s/gnu.h2
-rw-r--r--src/search.c8
-rw-r--r--src/w32.c3
-rw-r--r--src/w32term.c4
-rw-r--r--src/window.c36
-rw-r--r--src/xdisp.c8
-rw-r--r--src/xfaces.c2
-rw-r--r--src/xterm.c4
28 files changed, 368 insertions, 196 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 c27b4c69bb5..79bcf192eb7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
12012-01-17 Paul Eggert <eggert@cs.ucla.edu> 12012-02-10 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Fix integer width and related bugs (Bug#9874). 3 Fix integer width and related bugs (Bug#9874).
4 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp): 4 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
@@ -788,6 +788,160 @@
788 rather than rolling our own approximation. 788 rather than rolling our own approximation.
789 (SCROLL_BAR_VEC_SIZE): Remove; not used. 789 (SCROLL_BAR_VEC_SIZE): Remove; not used.
790 790
7912012-02-10 Glenn Morris <rgm@gnu.org>
792
793 * fns.c (Fsecure_hash): Doc fix.
794
7952012-02-09 Kenichi Handa <handa@m17n.org>
796
797 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
798
7992012-02-07 Chong Yidong <cyd@gnu.org>
800
801 * buffer.c (Fbuffer_local_variables)
802 (buffer_lisp_local_variables): Handle unbound vars correctly;
803 don't let Qunbound leak into Lisp.
804
8052012-02-07 Glenn Morris <rgm@gnu.org>
806
807 * image.c (Fimagemagick_types): Doc fix.
808
809 * image.c (imagemagick-render-type): Change it from a lisp object
810 to an integer. Move the doc here from the lisp manual.
811 Treat all values not equal to 0 the same.
812
8132012-02-06 Chong Yidong <cyd@gnu.org>
814
815 * doc.c (store_function_docstring): Avoid applying docstring of
816 alias to base function (Bug#2603).
817
8182012-02-04 Andreas Schwab <schwab@linux-m68k.org>
819
820 * .gdbinit (pp1, pv1): Remove redundant defines.
821 (pr): Use pp.
822
8232012-02-04 Chong Yidong <cyd@gnu.org>
824
825 * nsterm.m: Declare a global (Bug#10694).
826
8272012-02-04 Eli Zaretskii <eliz@gnu.org>
828
829 * w32.c (get_emacs_configuration_options): Include
830 --enable-checking, if specified, in the return value.
831
8322012-02-04 Martin Rudalics <rudalics@gmx.at>
833
834 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
835 after rounding frame sizes. (Bug#9723)
836
8372012-02-04 Eli Zaretskii <eliz@gnu.org>
838
839 * keyboard.c (adjust_point_for_property): Don't position point
840 before BEGV. (Bug#10696)
841
8422012-02-03 Paul Eggert <eggert@cs.ucla.edu>
843
844 Handle overflow when computing char display width (Bug#9496).
845 * character.c (char_width): Return EMACS_INT, not int.
846 (char_width, c_string_width): Check for overflow when
847 computing the width; this is possible now that individual
848 characters can have unbounded width. Problem introduced
849 by merge from Emacs 23 on 2012-01-19.
850
8512012-02-02 Michael Albinus <michael.albinus@gmx.de>
852
853 * dbusbind.c (Fdbus_register_method): Mention the return value
854 :ignore in the docstring.
855
8562012-02-02 Glenn Morris <rgm@gnu.org>
857
858 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
859
860 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
861 Unconditionally set to t. (Bug#10673)
862 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
863 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
864 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
865
8662012-02-02 Kenichi Handa <handa@m17n.org>
867
868 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
869 0, do not call append_composite_glyph.
870
8712012-02-02 Kenichi Handa <handa@m17n.org>
872
873 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
874 NULL (Bug#6988).
875 (x_produce_glyphs): If the component of a composition is a null
876 string, set it->pixel_width to 1 to avoid zero-width glyph.
877
8782012-02-01 Eli Zaretskii <eliz@gnu.org>
879
880 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
881 first 2 arguments are identical. This makes inserting large
882 output from a subprocess an order of magnitude faster on
883 MS-Windows, where all sbrk'ed memory is always contiguous.
884
8852012-01-31 Glenn Morris <rgm@gnu.org>
886
887 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
888 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
889 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
890
8912012-01-29 Glenn Morris <rgm@gnu.org>
892
893 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
894
8952012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
896
897 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
898
8992012-01-28 Chong Yidong <cyd@gnu.org>
900
901 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
902
9032012-01-26 Chong Yidong <cyd@gnu.org>
904
905 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
906
907 * search.c (Fsearch_forward, Fsearch_backward): Document negative
908 repeat counts (Bug#10507).
909
9102012-01-26 Glenn Morris <rgm@gnu.org>
911
912 * lread.c (syms_of_lread): Doc fix.
913
9142012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
915
916 * coding.c (encode_designation_at_bol): Change return value to
917 EMACS_INT.
918
9192012-01-25 Chong Yidong <cyd@gnu.org>
920
921 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
922
9232012-01-21 Chong Yidong <cyd@gnu.org>
924
925 * floatfns.c (Fcopysign): Make the second argument non-optional,
926 since nil is not allowed anyway.
927
9282012-01-21 Andreas Schwab <schwab@linux-m68k.org>
929
930 * process.c (read_process_output): Use p instead of XPROCESS (proc).
931 (send_process): Likewise.
932
9332012-01-19 Martin Rudalics <rudalics@gmx.at>
934
935 * window.c (save_window_save, Fcurrent_window_configuration)
936 (Vwindow_persistent_parameters): Do not use Qstate. Rewrite
937 doc-strings.
938
9392012-01-19 Kenichi Handa <handa@m17n.org>
940
941 * character.c (char_width): New function.
942 (Fchar_width, c_string_width, lisp_string_width):
943 Use char_width (Bug#9496).
944
7912012-01-16 Martin Rudalics <rudalics@gmx.at> 9452012-01-16 Martin Rudalics <rudalics@gmx.at>
792 946
793 * window.c (Vwindow_persistent_parameters): New variable. 947 * window.c (Vwindow_persistent_parameters): New variable.
@@ -3098,7 +3252,7 @@
3098 Remove unreachable code. 3252 Remove unreachable code.
3099 (read_hex, load_charset_map_from_file): Check for integer overflow. 3253 (read_hex, load_charset_map_from_file): Check for integer overflow.
3100 3254
3101 * xterm.c: don't go over XClientMessageEvent limit 3255 * xterm.c: Don't go over XClientMessageEvent limit.
3102 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed. 3256 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
3103 (x_send_scroll_bar_event): Likewise. Check that the size does not 3257 (x_send_scroll_bar_event): Likewise. Check that the size does not
3104 exceed limits imposed by XClientMessageEvent, as well as the usual 3258 exceed limits imposed by XClientMessageEvent, as well as the usual
@@ -6389,7 +6543,7 @@
6389 6543
6390 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'. 6544 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
6391 6545
6392 ccl: add integer overflow checks 6546 ccl: Add integer overflow checks.
6393 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT): 6547 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
6394 (IN_INT_RANGE): New macros. 6548 (IN_INT_RANGE): New macros.
6395 (ccl_driver): Use them to check for integer overflow when 6549 (ccl_driver): Use them to check for integer overflow when
diff --git a/src/buffer.c b/src/buffer.c
index b176bfed3fe..22ae522523a 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1022,7 +1022,10 @@ buffer_lisp_local_variables (struct buffer *buf)
1022 if (buf != current_buffer) 1022 if (buf != current_buffer)
1023 val = XCDR (elt); 1023 val = XCDR (elt);
1024 1024
1025 result = Fcons (Fcons (XCAR (elt), val), result); 1025 result = Fcons (EQ (val, Qunbound)
1026 ? XCAR (elt)
1027 : Fcons (XCAR (elt), val),
1028 result);
1026 } 1029 }
1027 1030
1028 return result; 1031 return result;
@@ -1064,9 +1067,12 @@ No argument or nil as argument means use current buffer as BUFFER. */)
1064 idx = PER_BUFFER_IDX (offset); 1067 idx = PER_BUFFER_IDX (offset);
1065 if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx)) 1068 if ((idx == -1 || PER_BUFFER_VALUE_P (buf, idx))
1066 && SYMBOLP (PER_BUFFER_SYMBOL (offset))) 1069 && SYMBOLP (PER_BUFFER_SYMBOL (offset)))
1067 result = Fcons (Fcons (PER_BUFFER_SYMBOL (offset), 1070 {
1068 PER_BUFFER_VALUE (buf, offset)), 1071 Lisp_Object sym = PER_BUFFER_SYMBOL (offset);
1069 result); 1072 Lisp_Object val = PER_BUFFER_VALUE (buf, offset);
1073 result = Fcons (EQ (val, Qunbound) ? sym : Fcons (sym, val),
1074 result);
1075 }
1070 } 1076 }
1071 } 1077 }
1072 1078
diff --git a/src/callproc.c b/src/callproc.c
index 22245f2d688..e17e082a0d4 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -168,7 +168,8 @@ The remaining arguments are optional.
168The program's input comes from file INFILE (nil means `/dev/null'). 168The program's input comes from file INFILE (nil means `/dev/null').
169Insert output in BUFFER before point; t means current buffer; nil for BUFFER 169Insert output in BUFFER before point; t means current buffer; nil for BUFFER
170 means discard it; 0 means discard and don't wait; and `(:file FILE)', where 170 means discard it; 0 means discard and don't wait; and `(:file FILE)', where
171 FILE is a file name string, means that it should be written to that file. 171 FILE is a file name string, means that it should be written to that file
172 \(if the file already exists it is overwritten).
172BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case, 173BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
173REAL-BUFFER says what to do with standard output, as above, 174REAL-BUFFER says what to do with standard output, as above,
174while STDERR-FILE says what to do with standard error in the child. 175while STDERR-FILE says what to do with standard error in the child.
@@ -949,7 +950,7 @@ Delete the text if fourth arg DELETE is non-nil.
949Insert output in BUFFER before point; t means current buffer; nil for 950Insert output in BUFFER before point; t means current buffer; nil for
950 BUFFER means discard it; 0 means discard and don't wait; and `(:file 951 BUFFER means discard it; 0 means discard and don't wait; and `(:file
951 FILE)', where FILE is a file name string, means that it should be 952 FILE)', where FILE is a file name string, means that it should be
952 written to that file. 953 written to that file (if the file already exists it is overwritten).
953BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case, 954BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
954REAL-BUFFER says what to do with standard output, as above, 955REAL-BUFFER says what to do with standard output, as above,
955while STDERR-FILE says what to do with standard error in the child. 956while STDERR-FILE says what to do with standard error in the child.
diff --git a/src/character.c b/src/character.c
index f15a20f6999..b85cedad937 100644
--- a/src/character.c
+++ b/src/character.c
@@ -308,6 +308,36 @@ If the multibyte character does not represent a byte, return -1. */)
308 } 308 }
309} 309}
310 310
311
312/* Return width (columns) of C considering the buffer display table DP. */
313
314static ptrdiff_t
315char_width (int c, struct Lisp_Char_Table *dp)
316{
317 ptrdiff_t width = CHAR_WIDTH (c);
318
319 if (dp)
320 {
321 Lisp_Object disp = DISP_CHAR_VECTOR (dp, c), ch;
322 int i;
323
324 if (VECTORP (disp))
325 for (i = 0, width = 0; i < ASIZE (disp); i++)
326 {
327 ch = AREF (disp, i);
328 if (CHARACTERP (ch))
329 {
330 int w = CHAR_WIDTH (XFASTINT (ch));
331 if (INT_ADD_OVERFLOW (width, w))
332 string_overflow ();
333 width += w;
334 }
335 }
336 }
337 return width;
338}
339
340
311DEFUN ("char-width", Fchar_width, Schar_width, 1, 1, 0, 341DEFUN ("char-width", Fchar_width, Schar_width, 1, 1, 0,
312 doc: /* Return width of CHAR when displayed in the current buffer. 342 doc: /* Return width of CHAR when displayed in the current buffer.
313The width is measured by how many columns it occupies on the screen. 343The width is measured by how many columns it occupies on the screen.
@@ -315,21 +345,12 @@ Tab is taken to occupy `tab-width' columns.
315usage: (char-width CHAR) */) 345usage: (char-width CHAR) */)
316 (Lisp_Object ch) 346 (Lisp_Object ch)
317{ 347{
318 Lisp_Object disp; 348 int c;
319 int c, width; 349 ptrdiff_t width;
320 struct Lisp_Char_Table *dp = buffer_display_table ();
321 350
322 CHECK_CHARACTER (ch); 351 CHECK_CHARACTER (ch);
323 c = XINT (ch); 352 c = XINT (ch);
324 353 width = char_width (c, buffer_display_table ());
325 /* Get the way the display table would display it. */
326 disp = dp ? DISP_CHAR_VECTOR (dp, c) : Qnil;
327
328 if (VECTORP (disp))
329 width = sanitize_char_width (ASIZE (disp));
330 else
331 width = CHAR_WIDTH (c);
332
333 return make_number (width); 354 return make_number (width);
334} 355}
335 356
@@ -350,25 +371,16 @@ c_string_width (const unsigned char *str, ptrdiff_t len, int precision,
350 371
351 while (i_byte < len) 372 while (i_byte < len)
352 { 373 {
353 int bytes, thiswidth; 374 int bytes;
354 Lisp_Object val;
355 int c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes); 375 int c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes);
376 ptrdiff_t thiswidth = char_width (c, dp);
356 377
357 if (dp) 378 if (precision <= 0)
358 {
359 val = DISP_CHAR_VECTOR (dp, c);
360 if (VECTORP (val))
361 thiswidth = sanitize_char_width (ASIZE (val));
362 else
363 thiswidth = CHAR_WIDTH (c);
364 }
365 else
366 { 379 {
367 thiswidth = CHAR_WIDTH (c); 380 if (INT_ADD_OVERFLOW (width, thiswidth))
381 string_overflow ();
368 } 382 }
369 383 else if (precision - width < thiswidth)
370 if (precision > 0
371 && (width + thiswidth > precision))
372 { 384 {
373 *nchars = i; 385 *nchars = i;
374 *nbytes = i_byte; 386 *nbytes = i_byte;
@@ -447,18 +459,7 @@ lisp_string_width (Lisp_Object string, ptrdiff_t precision,
447 else 459 else
448 c = str[i_byte], bytes = 1; 460 c = str[i_byte], bytes = 1;
449 chars = 1; 461 chars = 1;
450 if (dp) 462 thiswidth = char_width (c, dp);
451 {
452 val = DISP_CHAR_VECTOR (dp, c);
453 if (VECTORP (val))
454 thiswidth = sanitize_char_width (ASIZE (val));
455 else
456 thiswidth = CHAR_WIDTH (c);
457 }
458 else
459 {
460 thiswidth = CHAR_WIDTH (c);
461 }
462 } 463 }
463 464
464 if (precision <= 0) 465 if (precision <= 0)
diff --git a/src/coding.c b/src/coding.c
index be7166e8a14..42f342c390f 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -855,7 +855,7 @@ static void coding_alloc_by_making_gap (struct coding_system *,
855static unsigned char *alloc_destination (struct coding_system *, 855static unsigned char *alloc_destination (struct coding_system *,
856 ptrdiff_t, unsigned char *); 856 ptrdiff_t, unsigned char *);
857static void setup_iso_safe_charsets (Lisp_Object); 857static void setup_iso_safe_charsets (Lisp_Object);
858static int encode_designation_at_bol (struct coding_system *, 858static ptrdiff_t encode_designation_at_bol (struct coding_system *,
859 int *, int *, unsigned char *); 859 int *, int *, unsigned char *);
860static int detect_eol (const unsigned char *, 860static int detect_eol (const unsigned char *,
861 ptrdiff_t, enum coding_category); 861 ptrdiff_t, enum coding_category);
@@ -4351,7 +4351,7 @@ encode_invocation_designation (struct charset *charset,
4351 If the current block ends before any end-of-line, we may fail to 4351 If the current block ends before any end-of-line, we may fail to
4352 find all the necessary designations. */ 4352 find all the necessary designations. */
4353 4353
4354static int 4354static ptrdiff_t
4355encode_designation_at_bol (struct coding_system *coding, 4355encode_designation_at_bol (struct coding_system *coding,
4356 int *charbuf, int *charbuf_end, 4356 int *charbuf, int *charbuf_end,
4357 unsigned char *dst) 4357 unsigned char *dst)
@@ -6849,7 +6849,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
6849 dst_end = coding->destination + coding->dst_bytes; 6849 dst_end = coding->destination + coding->dst_bytes;
6850 coding_set_source (coding); 6850 coding_set_source (coding);
6851 src = coding->source + offset; 6851 src = coding->source + offset;
6852 src_end = coding->source + coding->src_bytes; 6852 src_end = coding->source + coding->consumed;
6853 if (EQ (coding->src_object, coding->dst_object)) 6853 if (EQ (coding->src_object, coding->dst_object))
6854 dst_end = (unsigned char *) src; 6854 dst_end = (unsigned char *) src;
6855 } 6855 }
@@ -6883,7 +6883,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
6883 dst_end = coding->destination + coding->dst_bytes; 6883 dst_end = coding->destination + coding->dst_bytes;
6884 coding_set_source (coding); 6884 coding_set_source (coding);
6885 src = coding->source + offset; 6885 src = coding->source + offset;
6886 src_end = coding->source + coding->src_bytes; 6886 src_end = coding->source + coding->consumed;
6887 if (EQ (coding->src_object, coding->dst_object)) 6887 if (EQ (coding->src_object, coding->dst_object))
6888 dst_end = (unsigned char *) src; 6888 dst_end = (unsigned char *) src;
6889 } 6889 }
@@ -6904,7 +6904,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
6904 dst = alloc_destination (coding, require, dst); 6904 dst = alloc_destination (coding, require, dst);
6905 coding_set_source (coding); 6905 coding_set_source (coding);
6906 src = coding->source + offset; 6906 src = coding->source + offset;
6907 src_end = coding->source + coding->src_bytes; 6907 src_end = coding->source + coding->consumed;
6908 } 6908 }
6909 } 6909 }
6910 produced_chars = coding->consumed_char; 6910 produced_chars = coding->consumed_char;
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 6af499ecafd..c4e57dad98a 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 749523158cb..f25e69e89a7 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5760,19 +5760,22 @@ change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int
5760 if (newwidth == 0) 5760 if (newwidth == 0)
5761 newwidth = FRAME_COLS (f); 5761 newwidth = FRAME_COLS (f);
5762 5762
5763 /* Compute width of windows in F. 5763 /* Compute width of windows in F. */
5764 This is the width of the frame without vertical scroll bars. */
5765 new_frame_total_cols = FRAME_TOTAL_COLS_ARG (f, newwidth);
5766
5767 /* Round up to the smallest acceptable size. */ 5764 /* Round up to the smallest acceptable size. */
5768 check_frame_size (f, &newheight, &newwidth); 5765 check_frame_size (f, &newheight, &newwidth);
5769 5766
5767 /* This is the width of the frame with vertical scroll bars and fringe
5768 columns. Do this after rounding - see discussion of bug#9723. */
5769 new_frame_total_cols = FRAME_TOTAL_COLS_ARG (f, newwidth);
5770
5770 /* If we're not changing the frame size, quit now. */ 5771 /* If we're not changing the frame size, quit now. */
5771 /* Frame width may be unchanged but the text portion may change, for example, 5772 /* Frame width may be unchanged but the text portion may change, for
5772 fullscreen and remove/add scroll bar. */ 5773 example, fullscreen and remove/add scroll bar. */
5773 if (newheight == FRAME_LINES (f) 5774 if (newheight == FRAME_LINES (f)
5774 && newwidth == FRAME_COLS (f) // text portion unchanged 5775 /* Text portion unchanged? */
5775 && new_frame_total_cols == FRAME_TOTAL_COLS (f)) // frame width unchanged 5776 && newwidth == FRAME_COLS (f)
5777 /* Frame width unchanged? */
5778 && new_frame_total_cols == FRAME_TOTAL_COLS (f))
5776 return; 5779 return;
5777 5780
5778 BLOCK_INPUT; 5781 BLOCK_INPUT;
diff --git a/src/doc.c b/src/doc.c
index 1a7b307816d..d71a3ce1d80 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -507,9 +507,11 @@ aren't strings. */)
507/* Scanning the DOC files and placing docstring offsets into functions. */ 507/* Scanning the DOC files and placing docstring offsets into functions. */
508 508
509static void 509static void
510store_function_docstring (Lisp_Object fun, ptrdiff_t offset) 510store_function_docstring (Lisp_Object obj, ptrdiff_t offset)
511{ 511{
512 fun = indirect_function (fun); 512 /* Don't use indirect_function here, or defaliases will apply their
513 docstrings to the base functions (Bug#2603). */
514 Lisp_Object fun = SYMBOLP (obj) ? XSYMBOL (obj)->function : obj;
513 515
514 /* The type determines where the docstring is stored. */ 516 /* The type determines where the docstring is stored. */
515 517
diff --git a/src/eval.c b/src/eval.c
index 2730fc9f3d7..ed3c811f28a 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -898,13 +898,14 @@ lisp_indirect_variable (Lisp_Object sym)
898DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0, 898DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0,
899 doc: /* Return t if VARIABLE is intended to be set and modified by users. 899 doc: /* Return t if VARIABLE is intended to be set and modified by users.
900\(The alternative is a variable used internally in a Lisp program.) 900\(The alternative is a variable used internally in a Lisp program.)
901A variable is a user variable if 901
902\(1) the first character of its documentation is `*', or 902This function returns t if (i) the first character of its
903\(2) it is customizable (its property list contains a non-nil value 903documentation is `*', or (ii) it is customizable (its property list
904 of `standard-value' or `custom-autoload'), or 904contains a non-nil value of `standard-value' or `custom-autoload'), or
905\(3) it is an alias for another user variable. 905\(iii) it is an alias for a user variable.
906Return nil if VARIABLE is an alias and there is a loop in the 906
907chain of symbols. */) 907But condition (i) is considered obsolete, so for most purposes this is
908equivalent to `custom-variable-p'. */)
908 (Lisp_Object variable) 909 (Lisp_Object variable)
909{ 910{
910 Lisp_Object documentation; 911 Lisp_Object documentation;
diff --git a/src/floatfns.c b/src/floatfns.c
index 87fa19acb1f..eaa1b32eb17 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -294,7 +294,7 @@ DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0,
294} 294}
295 295
296#ifdef HAVE_COPYSIGN 296#ifdef HAVE_COPYSIGN
297DEFUN ("copysign", Fcopysign, Scopysign, 1, 2, 0, 297DEFUN ("copysign", Fcopysign, Scopysign, 2, 2, 0,
298 doc: /* Copy sign of X2 to value of X1, and return the result. 298 doc: /* Copy sign of X2 to value of X1, and return the result.
299Cause an error if X1 or X2 is not a float. */) 299Cause an error if X1 or X2 is not a float. */)
300 (Lisp_Object x1, Lisp_Object x2) 300 (Lisp_Object x1, Lisp_Object x2)
diff --git a/src/fns.c b/src/fns.c
index b4430292c75..ed4f9d40b59 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -4851,12 +4851,15 @@ guesswork fails. Normally, an error is signaled in such case. */)
4851} 4851}
4852 4852
4853DEFUN ("secure-hash", Fsecure_hash, Ssecure_hash, 2, 5, 0, 4853DEFUN ("secure-hash", Fsecure_hash, Ssecure_hash, 2, 5, 0,
4854 doc: /* Return the secure hash of an OBJECT. 4854 doc: /* Return the secure hash of OBJECT, a buffer or string.
4855ALGORITHM is a symbol: md5, sha1, sha224, sha256, sha384 or sha512. 4855ALGORITHM is a symbol specifying the hash to use:
4856OBJECT is either a string or a buffer. 4856md5, sha1, sha224, sha256, sha384 or sha512.
4857Optional arguments START and END are character positions specifying 4857
4858which portion of OBJECT for computing the hash. If BINARY is non-nil, 4858The two optional arguments START and END are positions specifying for
4859return a string in binary form. */) 4859which part of OBJECT to compute the hash. If nil or omitted, uses the
4860whole OBJECT.
4861
4862If BINARY is non-nil, returns a string in binary form. */)
4860 (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object binary) 4863 (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp_Object binary)
4861{ 4864{
4862 return secure_hash (algorithm, object, start, end, Qnil, Qnil, binary); 4865 return secure_hash (algorithm, object, start, end, Qnil, Qnil, binary);
diff --git a/src/gnutls.c b/src/gnutls.c
index 99992e06cdc..a4eeb50bd74 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1121,7 +1121,10 @@ syms_of_gnutls (void)
1121 defsubr (&Sgnutls_available_p); 1121 defsubr (&Sgnutls_available_p);
1122 1122
1123 DEFVAR_INT ("gnutls-log-level", global_gnutls_log_level, 1123 DEFVAR_INT ("gnutls-log-level", global_gnutls_log_level,
1124 doc: /* Logging level used by the GnuTLS functions. */); 1124 doc: /* Logging level used by the GnuTLS functions.
1125Set this larger than 0 to get debug output in the *Messages* buffer.
11261 is for important messages, 2 is for debug data, and higher numbers
1127are as per the GnuTLS logging conventions. */);
1125 global_gnutls_log_level = 0; 1128 global_gnutls_log_level = 0;
1126} 1129}
1127 1130
diff --git a/src/image.c b/src/image.c
index 92cd75f99f4..c8d6be3a354 100644
--- a/src/image.c
+++ b/src/image.c
@@ -7618,7 +7618,6 @@ imagemagick_load_image (struct frame *f, struct image *img,
7618 EMACS_INT ino; 7618 EMACS_INT ino;
7619 int desired_width, desired_height; 7619 int desired_width, desired_height;
7620 double rotation; 7620 double rotation;
7621 EMACS_INT imagemagick_rendermethod;
7622 int pixelwidth; 7621 int pixelwidth;
7623 ImageInfo *image_info; 7622 ImageInfo *image_info;
7624 ExceptionInfo *exception; 7623 ExceptionInfo *exception;
@@ -7799,9 +7798,8 @@ imagemagick_load_image (struct frame *f, struct image *img,
7799 went ok. */ 7798 went ok. */
7800 7799
7801 init_color_table (); 7800 init_color_table ();
7802 imagemagick_rendermethod = (INTEGERP (Vimagemagick_render_type) 7801
7803 ? XINT (Vimagemagick_render_type) : 0); 7802 if (imagemagick_render_type == 0)
7804 if (imagemagick_rendermethod == 0)
7805 { 7803 {
7806 size_t image_height; 7804 size_t image_height;
7807 7805
@@ -7851,8 +7849,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7851 } 7849 }
7852 DestroyPixelIterator (iterator); 7850 DestroyPixelIterator (iterator);
7853 } 7851 }
7854 7852 else /* imagemagick_render_type != 0 */
7855 if (imagemagick_rendermethod == 1)
7856 { 7853 {
7857 /* Magicexportimage is normally faster than pixelpushing. This 7854 /* Magicexportimage is normally faster than pixelpushing. This
7858 method is also well tested. Some aspects of this method are 7855 method is also well tested. Some aspects of this method are
@@ -7987,6 +7984,7 @@ DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0,
7987Each entry in this list is a symbol named after an ImageMagick format 7984Each entry in this list is a symbol named after an ImageMagick format
7988tag. See the ImageMagick manual for a list of ImageMagick formats and 7985tag. See the ImageMagick manual for a list of ImageMagick formats and
7989their descriptions (http://www.imagemagick.org/script/formats.php). 7986their descriptions (http://www.imagemagick.org/script/formats.php).
7987You can also try the shell command: `identify -list format'.
7990 7988
7991Note that ImageMagick recognizes many file-types that Emacs does not 7989Note that ImageMagick recognizes many file-types that Emacs does not
7992recognize as images, such as C. See `imagemagick-types-inhibit'. */) 7990recognize as images, such as C. See `imagemagick-types-inhibit'. */)
@@ -8959,8 +8957,17 @@ The value can also be nil, meaning the cache is never cleared.
8959The function `clear-image-cache' disregards this variable. */); 8957The function `clear-image-cache' disregards this variable. */);
8960 Vimage_cache_eviction_delay = make_number (300); 8958 Vimage_cache_eviction_delay = make_number (300);
8961#ifdef HAVE_IMAGEMAGICK 8959#ifdef HAVE_IMAGEMAGICK
8962 DEFVAR_LISP ("imagemagick-render-type", Vimagemagick_render_type, 8960 DEFVAR_INT ("imagemagick-render-type", imagemagick_render_type,
8963 doc: /* Choose between ImageMagick render methods. */); 8961 doc: /* Integer indicating which ImageMagick rendering method to use.
8962The options are:
8963 0 -- the default method (pixel pushing)
8964 1 -- a newer method ("MagickExportImagePixels") that may perform
8965 better (speed etc) in some cases, but has not been as thoroughly
8966 tested with Emacs as the default method. This method requires
8967 ImageMagick version 6.4.6 (approximately) or later.
8968*/);
8969 /* MagickExportImagePixels is in 6.4.6-9, but not 6.4.4-10. */
8970 imagemagick_render_type = 0;
8964#endif 8971#endif
8965 8972
8966} 8973}
diff --git a/src/keyboard.c b/src/keyboard.c
index da15f663a0d..09743be6c3c 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1747,7 +1747,9 @@ adjust_point_for_property (ptrdiff_t last_pt, int modified)
1747 { 1747 {
1748 xassert (end > PT); 1748 xassert (end > PT);
1749 SET_PT (PT < last_pt 1749 SET_PT (PT < last_pt
1750 ? (STRINGP (val) && SCHARS (val) == 0 ? beg - 1 : beg) 1750 ? (STRINGP (val) && SCHARS (val) == 0
1751 ? max (beg - 1, BEGV)
1752 : beg)
1751 : end); 1753 : end);
1752 check_composition = check_invisible = 1; 1754 check_composition = check_invisible = 1;
1753 } 1755 }
@@ -11840,38 +11842,39 @@ result of looking up the original command in the active keymaps. */);
11840 Vthis_original_command = Qnil; 11842 Vthis_original_command = Qnil;
11841 11843
11842 DEFVAR_INT ("auto-save-interval", auto_save_interval, 11844 DEFVAR_INT ("auto-save-interval", auto_save_interval,
11843 doc: /* *Number of input events between auto-saves. 11845 doc: /* Number of input events between auto-saves.
11844Zero means disable autosaving due to number of characters typed. */); 11846Zero means disable autosaving due to number of characters typed. */);
11845 auto_save_interval = 300; 11847 auto_save_interval = 300;
11846 11848
11847 DEFVAR_LISP ("auto-save-timeout", Vauto_save_timeout, 11849 DEFVAR_LISP ("auto-save-timeout", Vauto_save_timeout,
11848 doc: /* *Number of seconds idle time before auto-save. 11850 doc: /* Number of seconds idle time before auto-save.
11849Zero or nil means disable auto-saving due to idleness. 11851Zero or nil means disable auto-saving due to idleness.
11850After auto-saving due to this many seconds of idle time, 11852After auto-saving due to this many seconds of idle time,
11851Emacs also does a garbage collection if that seems to be warranted. */); 11853Emacs also does a garbage collection if that seems to be warranted. */);
11852 XSETFASTINT (Vauto_save_timeout, 30); 11854 XSETFASTINT (Vauto_save_timeout, 30);
11853 11855
11854 DEFVAR_LISP ("echo-keystrokes", Vecho_keystrokes, 11856 DEFVAR_LISP ("echo-keystrokes", Vecho_keystrokes,
11855 doc: /* *Nonzero means echo unfinished commands after this many seconds of pause. 11857 doc: /* Nonzero means echo unfinished commands after this many seconds of pause.
11856The value may be integer or floating point. */); 11858The value may be integer or floating point.
11859If the value is zero, don't echo at all. */);
11857 Vecho_keystrokes = make_number (1); 11860 Vecho_keystrokes = make_number (1);
11858 11861
11859 DEFVAR_INT ("polling-period", polling_period, 11862 DEFVAR_INT ("polling-period", polling_period,
11860 doc: /* *Interval between polling for input during Lisp execution. 11863 doc: /* Interval between polling for input during Lisp execution.
11861The reason for polling is to make C-g work to stop a running program. 11864The reason for polling is to make C-g work to stop a running program.
11862Polling is needed only when using X windows and SIGIO does not work. 11865Polling is needed only when using X windows and SIGIO does not work.
11863Polling is automatically disabled in all other cases. */); 11866Polling is automatically disabled in all other cases. */);
11864 polling_period = 2; 11867 polling_period = 2;
11865 11868
11866 DEFVAR_LISP ("double-click-time", Vdouble_click_time, 11869 DEFVAR_LISP ("double-click-time", Vdouble_click_time,
11867 doc: /* *Maximum time between mouse clicks to make a double-click. 11870 doc: /* Maximum time between mouse clicks to make a double-click.
11868Measured in milliseconds. The value nil means disable double-click 11871Measured in milliseconds. The value nil means disable double-click
11869recognition; t means double-clicks have no time limit and are detected 11872recognition; t means double-clicks have no time limit and are detected
11870by position only. */); 11873by position only. */);
11871 Vdouble_click_time = make_number (500); 11874 Vdouble_click_time = make_number (500);
11872 11875
11873 DEFVAR_INT ("double-click-fuzz", double_click_fuzz, 11876 DEFVAR_INT ("double-click-fuzz", double_click_fuzz,
11874 doc: /* *Maximum mouse movement between clicks to make a double-click. 11877 doc: /* Maximum mouse movement between clicks to make a double-click.
11875On window-system frames, value is the number of pixels the mouse may have 11878On window-system frames, value is the number of pixels the mouse may have
11876moved horizontally or vertically between two clicks to make a double-click. 11879moved horizontally or vertically between two clicks to make a double-click.
11877On non window-system frames, value is interpreted in units of 1/8 characters 11880On non window-system frames, value is interpreted in units of 1/8 characters
@@ -11882,7 +11885,7 @@ to count as a drag. */);
11882 double_click_fuzz = 3; 11885 double_click_fuzz = 3;
11883 11886
11884 DEFVAR_BOOL ("inhibit-local-menu-bar-menus", inhibit_local_menu_bar_menus, 11887 DEFVAR_BOOL ("inhibit-local-menu-bar-menus", inhibit_local_menu_bar_menus,
11885 doc: /* *Non-nil means inhibit local map menu bar menus. */); 11888 doc: /* Non-nil means inhibit local map menu bar menus. */);
11886 inhibit_local_menu_bar_menus = 0; 11889 inhibit_local_menu_bar_menus = 0;
11887 11890
11888 DEFVAR_INT ("num-input-keys", num_input_keys, 11891 DEFVAR_INT ("num-input-keys", num_input_keys,
@@ -12057,7 +12060,7 @@ and the minor mode maps regardless of `overriding-local-map'. */);
12057 Vspecial_event_map = Fcons (intern_c_string ("keymap"), Qnil); 12060 Vspecial_event_map = Fcons (intern_c_string ("keymap"), Qnil);
12058 12061
12059 DEFVAR_LISP ("track-mouse", do_mouse_tracking, 12062 DEFVAR_LISP ("track-mouse", do_mouse_tracking,
12060 doc: /* *Non-nil means generate motion events for mouse motion. */); 12063 doc: /* Non-nil means generate motion events for mouse motion. */);
12061 12064
12062 DEFVAR_KBOARD ("system-key-alist", Vsystem_key_alist, 12065 DEFVAR_KBOARD ("system-key-alist", Vsystem_key_alist,
12063 doc: /* Alist of system-specific X windows key symbols. 12066 doc: /* Alist of system-specific X windows key symbols.
@@ -12151,7 +12154,7 @@ immediately after running `post-command-hook'. */);
12151 Vdelayed_warnings_list = Qnil; 12154 Vdelayed_warnings_list = Qnil;
12152 12155
12153 DEFVAR_LISP ("suggest-key-bindings", Vsuggest_key_bindings, 12156 DEFVAR_LISP ("suggest-key-bindings", Vsuggest_key_bindings,
12154 doc: /* *Non-nil means show the equivalent key-binding when M-x command has one. 12157 doc: /* Non-nil means show the equivalent key-binding when M-x command has one.
12155The value can be a length of time to show the message for. 12158The value can be a length of time to show the message for.
12156If the value is non-nil and not a number, we wait 2 seconds. */); 12159If the value is non-nil and not a number, we wait 2 seconds. */);
12157 Vsuggest_key_bindings = Qt; 12160 Vsuggest_key_bindings = Qt;
@@ -12211,7 +12214,7 @@ just after executing the command. */);
12211 12214
12212 DEFVAR_LISP ("global-disable-point-adjustment", 12215 DEFVAR_LISP ("global-disable-point-adjustment",
12213 Vglobal_disable_point_adjustment, 12216 Vglobal_disable_point_adjustment,
12214 doc: /* *If non-nil, always suppress point adjustment. 12217 doc: /* If non-nil, always suppress point adjustment.
12215 12218
12216The default value is nil, in which case, point adjustment are 12219The default value is nil, in which case, point adjustment are
12217suppressed only after special commands that set 12220suppressed only after special commands that set
@@ -12219,7 +12222,7 @@ suppressed only after special commands that set
12219 Vglobal_disable_point_adjustment = Qnil; 12222 Vglobal_disable_point_adjustment = Qnil;
12220 12223
12221 DEFVAR_LISP ("minibuffer-message-timeout", Vminibuffer_message_timeout, 12224 DEFVAR_LISP ("minibuffer-message-timeout", Vminibuffer_message_timeout,
12222 doc: /* *How long to display an echo-area message when the minibuffer is active. 12225 doc: /* How long to display an echo-area message when the minibuffer is active.
12223If the value is not a number, such messages don't time out. */); 12226If the value is not a number, such messages don't time out. */);
12224 Vminibuffer_message_timeout = make_number (2); 12227 Vminibuffer_message_timeout = make_number (2);
12225 12228
diff --git a/src/lread.c b/src/lread.c
index 256624da046..dfcb3eeab5e 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4601,7 +4601,8 @@ to load. See also `load-dangerous-libraries'. */);
4601Non-nil means that the code in the current buffer should be evaluated 4601Non-nil means that the code in the current buffer should be evaluated
4602with lexical binding. 4602with lexical binding.
4603This variable is automatically set from the file variables of an 4603This variable is automatically set from the file variables of an
4604interpreted Lisp file read using `load'. */); 4604interpreted Lisp file read using `load'. Unlike other file local
4605variables, this must be set in the first line of a file. */);
4605 Fmake_variable_buffer_local (Qlexical_binding); 4606 Fmake_variable_buffer_local (Qlexical_binding);
4606 4607
4607 DEFVAR_LISP ("eval-buffer-list", Veval_buffer_list, 4608 DEFVAR_LISP ("eval-buffer-list", Veval_buffer_list,
diff --git a/src/minibuf.c b/src/minibuf.c
index cf860847d59..c3a49bff0a5 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2002,7 +2002,7 @@ The function is called with the arguments passed to `read-buffer'. */);
2002 2002
2003 DEFVAR_BOOL ("read-buffer-completion-ignore-case", 2003 DEFVAR_BOOL ("read-buffer-completion-ignore-case",
2004 read_buffer_completion_ignore_case, 2004 read_buffer_completion_ignore_case,
2005 doc: /* *Non-nil means completion ignores case when reading a buffer name. */); 2005 doc: /* Non-nil means completion ignores case when reading a buffer name. */);
2006 read_buffer_completion_ignore_case = 0; 2006 read_buffer_completion_ignore_case = 0;
2007 2007
2008 DEFVAR_LISP ("minibuffer-setup-hook", Vminibuffer_setup_hook, 2008 DEFVAR_LISP ("minibuffer-setup-hook", Vminibuffer_setup_hook,
@@ -2014,20 +2014,24 @@ The function is called with the arguments passed to `read-buffer'. */);
2014 Vminibuffer_exit_hook = Qnil; 2014 Vminibuffer_exit_hook = Qnil;
2015 2015
2016 DEFVAR_LISP ("history-length", Vhistory_length, 2016 DEFVAR_LISP ("history-length", Vhistory_length,
2017 doc: /* *Maximum length for history lists before truncation takes place. 2017 doc: /* Maximum length of history lists before truncation takes place.
2018A number means that length; t means infinite. Truncation takes place 2018A number means truncate to that length; truncation deletes old
2019just after a new element is inserted. Setting the `history-length' 2019elements, and is done just after inserting a new element.
2020property of a history variable overrides this default. */); 2020A value of t means no truncation.
2021
2022This variable only affects history lists that don't specify their own
2023maximum lengths. Setting the `history-length' property of a history
2024variable overrides this default. */);
2021 XSETFASTINT (Vhistory_length, 30); 2025 XSETFASTINT (Vhistory_length, 30);
2022 2026
2023 DEFVAR_BOOL ("history-delete-duplicates", history_delete_duplicates, 2027 DEFVAR_BOOL ("history-delete-duplicates", history_delete_duplicates,
2024 doc: /* *Non-nil means to delete duplicates in history. 2028 doc: /* Non-nil means to delete duplicates in history.
2025If set to t when adding a new history element, all previous identical 2029If set to t when adding a new history element, all previous identical
2026elements are deleted from the history list. */); 2030elements are deleted from the history list. */);
2027 history_delete_duplicates = 0; 2031 history_delete_duplicates = 0;
2028 2032
2029 DEFVAR_LISP ("history-add-new-input", Vhistory_add_new_input, 2033 DEFVAR_LISP ("history-add-new-input", Vhistory_add_new_input,
2030 doc: /* *Non-nil means to add new elements in history. 2034 doc: /* Non-nil means to add new elements in history.
2031If set to nil, minibuffer reading functions don't add new elements to the 2035If set to nil, minibuffer reading functions don't add new elements to the
2032history list, so it is possible to do this afterwards by calling 2036history list, so it is possible to do this afterwards by calling
2033`add-to-history' explicitly. */); 2037`add-to-history' explicitly. */);
@@ -2042,7 +2046,7 @@ controls the behavior, rather than this variable. */);
2042 completion_ignore_case = 0; 2046 completion_ignore_case = 0;
2043 2047
2044 DEFVAR_BOOL ("enable-recursive-minibuffers", enable_recursive_minibuffers, 2048 DEFVAR_BOOL ("enable-recursive-minibuffers", enable_recursive_minibuffers,
2045 doc: /* *Non-nil means to allow minibuffer commands while in the minibuffer. 2049 doc: /* Non-nil means to allow minibuffer commands while in the minibuffer.
2046This variable makes a difference whenever the minibuffer window is active. */); 2050This variable makes a difference whenever the minibuffer window is active. */);
2047 enable_recursive_minibuffers = 0; 2051 enable_recursive_minibuffers = 0;
2048 2052
@@ -2098,7 +2102,7 @@ is added with
2098 Vminibuffer_history_position = Qnil; 2102 Vminibuffer_history_position = Qnil;
2099 2103
2100 DEFVAR_BOOL ("minibuffer-auto-raise", minibuffer_auto_raise, 2104 DEFVAR_BOOL ("minibuffer-auto-raise", minibuffer_auto_raise,
2101 doc: /* *Non-nil means entering the minibuffer raises the minibuffer's frame. 2105 doc: /* Non-nil means entering the minibuffer raises the minibuffer's frame.
2102Some uses of the echo area also raise that frame (since they use it too). */); 2106Some uses of the echo area also raise that frame (since they use it too). */);
2103 minibuffer_auto_raise = 0; 2107 minibuffer_auto_raise = 0;
2104 2108
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/process.c b/src/process.c
index b4fca389d0d..daa49b129ae 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5046,9 +5046,8 @@ read_process_output (Lisp_Object proc, register int channel)
5046 proc_buffered_char[channel] = -1; 5046 proc_buffered_char[channel] = -1;
5047 } 5047 }
5048#ifdef HAVE_GNUTLS 5048#ifdef HAVE_GNUTLS
5049 if (XPROCESS (proc)->gnutls_p) 5049 if (p->gnutls_p)
5050 nbytes = emacs_gnutls_read (XPROCESS (proc), 5050 nbytes = emacs_gnutls_read (p, chars + carryover + buffered,
5051 chars + carryover + buffered,
5052 readmax - buffered); 5051 readmax - buffered);
5053 else 5052 else
5054#endif 5053#endif
@@ -5513,9 +5512,8 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5513#endif 5512#endif
5514 { 5513 {
5515#ifdef HAVE_GNUTLS 5514#ifdef HAVE_GNUTLS
5516 if (XPROCESS (proc)->gnutls_p) 5515 if (p->gnutls_p)
5517 written = emacs_gnutls_write (XPROCESS (proc), 5516 written = emacs_gnutls_write (p, buf, this);
5518 buf, this);
5519 else 5517 else
5520#endif 5518#endif
5521 written = emacs_write (outfd, buf, this); 5519 written = emacs_write (outfd, buf, this);
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/s/gnu.h b/src/s/gnu.h
index be831a833a5..37aaa1357cc 100644
--- a/src/s/gnu.h
+++ b/src/s/gnu.h
@@ -44,5 +44,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
44#endif /* !_IO_STDIO_H */ 44#endif /* !_IO_STDIO_H */
45#endif /* emacs */ 45#endif /* emacs */
46 46
47#define POSIX_SIGNALS 1
48
47/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */ 49/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */
48#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS 50#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
diff --git a/src/search.c b/src/search.c
index 0d451bd11c3..f33965d4d70 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2192,7 +2192,9 @@ An optional second argument bounds the search; it is a buffer position.
2192The match found must not extend before that position. 2192The match found must not extend before that position.
2193Optional third argument, if t, means if fail just return nil (no error). 2193Optional third argument, if t, means if fail just return nil (no error).
2194 If not nil and not t, position at limit of search and return nil. 2194 If not nil and not t, position at limit of search and return nil.
2195Optional fourth argument is repeat count--search for successive occurrences. 2195Optional fourth argument COUNT, if non-nil, means to search for COUNT
2196 successive occurrences. If COUNT is negative, search forward,
2197 instead of backward, for -COUNT occurrences.
2196 2198
2197Search case-sensitivity is determined by the value of the variable 2199Search case-sensitivity is determined by the value of the variable
2198`case-fold-search', which see. 2200`case-fold-search', which see.
@@ -2211,7 +2213,9 @@ The match found must not extend after that position. A value of nil is
2211 equivalent to (point-max). 2213 equivalent to (point-max).
2212Optional third argument, if t, means if fail just return nil (no error). 2214Optional third argument, if t, means if fail just return nil (no error).
2213 If not nil and not t, move to limit of search and return nil. 2215 If not nil and not t, move to limit of search and return nil.
2214Optional fourth argument is repeat count--search for successive occurrences. 2216Optional fourth argument COUNT, if non-nil, means to search for COUNT
2217 successive occurrences. If COUNT is negative, search backward,
2218 instead of forward, for -COUNT occurrences.
2215 2219
2216Search case-sensitivity is determined by the value of the variable 2220Search case-sensitivity is determined by the value of the variable
2217`case-fold-search', which see. 2221`case-fold-search', which see.
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/window.c b/src/window.c
index edf60cd8ff3..a0b11e0e320 100644
--- a/src/window.c
+++ b/src/window.c
@@ -57,7 +57,7 @@ static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window;
57static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically; 57static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically;
58static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; 58static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command;
59static Lisp_Object Qsafe, Qabove, Qbelow; 59static Lisp_Object Qsafe, Qabove, Qbelow;
60static Lisp_Object Qauto_buffer_name, Qclone_of, Qstate; 60static Lisp_Object Qauto_buffer_name, Qclone_of;
61 61
62static int displayed_window_lines (struct window *); 62static int displayed_window_lines (struct window *);
63static struct window *decode_window (Lisp_Object); 63static struct window *decode_window (Lisp_Object);
@@ -5891,9 +5891,8 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i)
5891 tem = XCDR (tem)) 5891 tem = XCDR (tem))
5892 { 5892 {
5893 pers = XCAR (tem); 5893 pers = XCAR (tem);
5894 /* Save values for persistent window parameters whose cdr 5894 /* Save values for persistent window parameters. */
5895 is either nil or t. */ 5895 if (CONSP (pers) && !NILP (XCDR (pers)))
5896 if (CONSP (pers) && (NILP (XCDR (pers)) || EQ (XCDR (pers), Qt)))
5897 { 5896 {
5898 par = Fassq (XCAR (pers), w->window_parameters); 5897 par = Fassq (XCAR (pers), w->window_parameters);
5899 if (NILP (par)) 5898 if (NILP (par))
@@ -5968,7 +5967,9 @@ and for each displayed buffer, where display starts, and the positions of
5968point and mark. An exception is made for point in the current buffer: 5967point and mark. An exception is made for point in the current buffer:
5969its value is -not- saved. 5968its value is -not- saved.
5970This also records the currently selected frame, and FRAME's focus 5969This also records the currently selected frame, and FRAME's focus
5971redirection (see `redirect-frame-focus'). */) 5970redirection (see `redirect-frame-focus'). The variable
5971`window-persistent-parameters' specifies which window parameters are
5972saved by this function. */)
5972 (Lisp_Object frame) 5973 (Lisp_Object frame)
5973{ 5974{
5974 register Lisp_Object tem; 5975 register Lisp_Object tem;
@@ -6506,7 +6507,6 @@ syms_of_window (void)
6506 DEFSYM (Qbelow, "below"); 6507 DEFSYM (Qbelow, "below");
6507 DEFSYM (Qauto_buffer_name, "auto-buffer-name"); 6508 DEFSYM (Qauto_buffer_name, "auto-buffer-name");
6508 DEFSYM (Qclone_of, "clone-of"); 6509 DEFSYM (Qclone_of, "clone-of");
6509 DEFSYM (Qstate, "state");
6510 6510
6511 staticpro (&Vwindow_list); 6511 staticpro (&Vwindow_list);
6512 6512
@@ -6618,28 +6618,28 @@ function `set-window-combination-limit'. */);
6618 6618
6619 DEFVAR_LISP ("window-persistent-parameters", Vwindow_persistent_parameters, 6619 DEFVAR_LISP ("window-persistent-parameters", Vwindow_persistent_parameters,
6620 doc: /* Alist of persistent window parameters. 6620 doc: /* Alist of persistent window parameters.
6621Parameters in this list are saved by `current-window-configuration' and 6621This alist specifies which window parameters shall get saved by
6622`window-state-get' and subsequently restored to their previous values by 6622`current-window-configuration' and `window-state-get' and subsequently
6623`set-window-configuration' and `window-state-put'. 6623restored to their previous values by `set-window-configuration' and
6624`window-state-put'.
6624 6625
6625The car of each entry of this alist is the symbol specifying the 6626The car of each entry of this alist is the symbol specifying the
6626parameter. The cdr is one of the following: 6627parameter. The cdr is one of the following:
6627 6628
6628The symbol `state' means the parameter is saved by `window-state-get' 6629nil means the parameter is neither saved by `window-state-get' nor by
6629provided its IGNORE argument is nil. `current-window-configuration' 6630`current-window-configuration'.
6630does not save this parameter.
6631 6631
6632nil means the parameter is saved by `current-window-configuration' and, 6632t means the parameter is saved by `current-window-configuration' and,
6633provided its IGNORE argument is nil, by `window-state-get'. 6633provided its WRITABLE argument is nil, by `window-state-get'.
6634 6634
6635t means the parameter is saved unconditionally by both 6635The symbol `writable' means the parameter is saved unconditionally by
6636`current-window-configuration' and `window-state-get'. Parameters 6636both `current-window-configuration' and `window-state-get'. Do not use
6637without read syntax (like windows or frames) should not use that. 6637this value for parameters without read syntax (like windows or frames).
6638 6638
6639Parameters not saved by `current-window-configuration' or 6639Parameters not saved by `current-window-configuration' or
6640`window-state-get' are left alone by `set-window-configuration' 6640`window-state-get' are left alone by `set-window-configuration'
6641respectively are not installed by `window-state-put'. */); 6641respectively are not installed by `window-state-put'. */);
6642 Vwindow_persistent_parameters = list1 (Fcons (Qclone_of, Qstate)); 6642 Vwindow_persistent_parameters = list1 (Fcons (Qclone_of, Qt));
6643 6643
6644 defsubr (&Sselected_window); 6644 defsubr (&Sselected_window);
6645 defsubr (&Sminibuffer_window); 6645 defsubr (&Sminibuffer_window);
diff --git a/src/xdisp.c b/src/xdisp.c
index 58678fc6385..3dac7ae011e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -22745,7 +22745,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
22745 ptrdiff_t cmp_id = (row)->glyphs[area][START].u.cmp.id; \ 22745 ptrdiff_t cmp_id = (row)->glyphs[area][START].u.cmp.id; \
22746 struct composition *cmp = composition_table[cmp_id]; \ 22746 struct composition *cmp = composition_table[cmp_id]; \
22747 XChar2b *char2b; \ 22747 XChar2b *char2b; \
22748 struct glyph_string *first_s IF_LINT (= NULL); \ 22748 struct glyph_string *first_s = NULL; \
22749 int n; \ 22749 int n; \
22750 \ 22750 \
22751 char2b = (XChar2b *) alloca ((sizeof *char2b) * cmp->glyph_len); \ 22751 char2b = (XChar2b *) alloca ((sizeof *char2b) * cmp->glyph_len); \
@@ -24407,7 +24407,7 @@ x_produce_glyphs (struct it *it)
24407 /* Initialize the bounding box. */ 24407 /* Initialize the bounding box. */
24408 if (pcm) 24408 if (pcm)
24409 { 24409 {
24410 width = pcm->width; 24410 width = cmp->glyph_len > 0 ? pcm->width : 0;
24411 ascent = pcm->ascent; 24411 ascent = pcm->ascent;
24412 descent = pcm->descent; 24412 descent = pcm->descent;
24413 lbearing = pcm->lbearing; 24413 lbearing = pcm->lbearing;
@@ -24415,7 +24415,7 @@ x_produce_glyphs (struct it *it)
24415 } 24415 }
24416 else 24416 else
24417 { 24417 {
24418 width = font->space_width; 24418 width = cmp->glyph_len > 0 ? font->space_width : 0;
24419 ascent = FONT_BASE (font); 24419 ascent = FONT_BASE (font);
24420 descent = FONT_DESCENT (font); 24420 descent = FONT_DESCENT (font);
24421 lbearing = 0; 24421 lbearing = 0;
@@ -24633,7 +24633,7 @@ x_produce_glyphs (struct it *it)
24633 if (it->descent < 0) 24633 if (it->descent < 0)
24634 it->descent = 0; 24634 it->descent = 0;
24635 24635
24636 if (it->glyph_row) 24636 if (it->glyph_row && cmp->glyph_len > 0)
24637 append_composite_glyph (it); 24637 append_composite_glyph (it);
24638 } 24638 }
24639 else if (it->what == IT_COMPOSITION) 24639 else if (it->what == IT_COMPOSITION)
diff --git a/src/xfaces.c b/src/xfaces.c
index 151da1e032b..7c3bc8d2749 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3364,7 +3364,7 @@ update_face_from_frame_parameter (struct frame *f, Lisp_Object param,
3364 3364
3365 /* Changing the background color might change the background 3365 /* Changing the background color might change the background
3366 mode, so that we have to load new defface specs. 3366 mode, so that we have to load new defface specs.
3367 Call frame-update-face-colors to do that. */ 3367 Call frame-set-background-mode to do that. */
3368 XSETFRAME (frame, f); 3368 XSETFRAME (frame, f);
3369 call1 (Qframe_set_background_mode, frame); 3369 call1 (Qframe_set_background_mode, frame);
3370 3370
diff --git a/src/xterm.c b/src/xterm.c
index 2a2ae105e2e..6b19533e97c 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
@@ -10844,7 +10844,7 @@ selected window or cursor position is preserved. */);
10844A value of nil means Emacs doesn't use toolkit scroll bars. 10844A value of nil means Emacs doesn't use toolkit scroll bars.
10845With the X Window system, the value is a symbol describing the 10845With the X Window system, the value is a symbol describing the
10846X toolkit. Possible values are: gtk, motif, xaw, or xaw3d. 10846X toolkit. Possible values are: gtk, motif, xaw, or xaw3d.
10847With MS Windows, the value is t. */); 10847With MS Windows or Nextstep, the value is t. */);
10848#ifdef USE_TOOLKIT_SCROLL_BARS 10848#ifdef USE_TOOLKIT_SCROLL_BARS
10849#ifdef USE_MOTIF 10849#ifdef USE_MOTIF
10850 Vx_toolkit_scroll_bars = intern_c_string ("motif"); 10850 Vx_toolkit_scroll_bars = intern_c_string ("motif");