aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2006-11-21 08:56:38 +0000
committerMiles Bader2006-11-21 08:56:38 +0000
commiteeb7eaa88482114822730380196f4e7a3c0870dd (patch)
treee8c3861b628ad53c6b8f158b74d1be8bd8590aeb /src
parentb15d6f4265b10fbc413caca03246feff9c87d53e (diff)
parenta98d0b8e8948293de119c4cdd7a8c79318ad82fa (diff)
downloademacs-eeb7eaa88482114822730380196f4e7a3c0870dd.tar.gz
emacs-eeb7eaa88482114822730380196f4e7a3c0870dd.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 505-522) - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: etc/TUTORIAL.cn: Updated. - Merge from erc--emacs--22 * gnus--rel--5.10 (patch 164-167) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-137
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog130
-rw-r--r--src/alloc.c22
-rw-r--r--src/bytecode.c2
-rw-r--r--src/category.c3
-rw-r--r--src/coding.c4
-rw-r--r--src/config.in3
-rw-r--r--src/data.c4
-rw-r--r--src/editfns.c3
-rw-r--r--src/fileio.c36
-rw-r--r--src/fns.c20
-rw-r--r--src/frame.c3
-rw-r--r--src/indent.c11
-rw-r--r--src/macfns.c56
-rw-r--r--src/macmenu.c16
-rw-r--r--src/macterm.c31
-rw-r--r--src/minibuf.c2
-rw-r--r--src/process.c2
-rw-r--r--src/s/gnu-linux.h2
-rw-r--r--src/s/ms-w32.h2
-rw-r--r--src/search.c2
-rw-r--r--src/term.c7
-rw-r--r--src/termhooks.h5
-rw-r--r--src/xfaces.c2
-rw-r--r--src/xmenu.c17
-rw-r--r--src/xselect.c8
-rw-r--r--src/xterm.c117
-rw-r--r--src/xterm.h10
27 files changed, 414 insertions, 106 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 601d1058b1b..358e6374810 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,130 @@
12006-11-21 Richard Stallman <rms@gnu.org>
2
3 * fileio.c: Break line before &&, not after.
4
52006-11-20 Eli Zaretskii <eliz@gnu.org>
6
7 * fns.c (concat) [!__GNUC__]: Add prototype.
8
92006-11-20 Kenichi Handa <handa@m17n.org>
10
11 * fileio.c (Fread_file_name_internal): Use SBYTES (not SCHARS) to
12 check the tailing slash of a filename.
13
142006-11-20 KOBAYASHI Yasuhiro <kobayays@otsukakj.co.jp> (tiny change)
15
16 * indent.c (Fvertical_motion): Include composition in the case of
17 overshoot expected.
18
192006-11-19 Andreas Schwab <schwab@gnu.org>
20
21 * xfaces.c (Fdisplay_supports_face_attributes_p): Initialize
22 supports.
23
24 * xmenu.c (Fx_popup_menu): Initialize selection.
25
262006-11-18 Andreas Schwab <schwab@suse.de>
27
28 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Update call to
29 mark_memory.
30
312006-11-17 Tetsurou Okazaki <okazaki@be.to> (tiny change)
32
33 * xterm.c (do_ewmh_fullscreen): Declare variable before XSETFRAME
34 to avoid gcc 2.96 error.
35
362006-11-17 NIIMI Satoshi <sa2c@sa2c.net> (tiny change)
37
38 * search.c (simple_search): In the loop of backward searching,
39 check also the byte position against the limit.
40
412006-11-14 Romain Francoise <romain@orebokech.com>
42
43 * minibuf.c (Fcompleting_read): Fix typo in docstring.
44
452006-11-14 Kenichi Handa <handa@m17n.org>
46
47 * coding.c (code_convert_region): Initialize
48 coding->heading_ascii.
49 (decode_coding_string, code_convert_region): Likewise.
50
512006-11-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
52
53 * config.in: Regenerate.
54
55 * macfns.c (Fx_display_mm_height, Fx_display_mm_width)
56 [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
57 && MAC_OS_X_VERSION_MIN_REQUIRED == 1020]: Check if
58 CGDisplayScreenSize is available.
59
60 * macmenu.c (menu_quit_handler, install_menu_quit_handler):
61 Replace `#ifdef HAVE_CANCELMENUTRACKING' with
62 `#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030'.
63 (install_menu_quit_handler) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
64 && MAC_OS_X_VERSION_MIN_REQUIRED == 1020]: Check if
65 CancelMenuTracking is available.
66
67 * macterm.c [USE_CG_TEXT_DRAWING] (mac_draw_image_string_cg)
68 [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
69 && MAC_OS_X_VERSION_MIN_REQUIRED == 1020]: Check if
70 CGContextShowGlyphsWithAdvances is available.
71
722006-11-13 Jason Rumney <jasonr@gnu.org>
73
74 * s/ms-w32.h: Define HAVE_INET_SOCKETS.
75
762006-11-13 Nozomu Ando <nand@mac.com>
77
78 * alloc.c (mark_memory): New argument OFFSET. All uses changed.
79 Fix address calculations for case END < START.
80 (mark_stack): Impose Lisp_Object alignment on jmp_buf.
81
822006-11-12 Juanma Barranquero <lekktu@gmail.com>
83
84 * coding.c (Fencode_sjis_char, Fencode_big5_char):
85 Improve argument/docstring consistency.
86
87 * editfns.c (Fmessage): Doc fixes.
88
89 * process.c (syms_of_process) <delete-exited-processes>: Doc fix.
90
912006-11-12 Chong Yidong <cyd@stupidchicken.com>
92
93 * xmenu.c (popup_activated): Define outside HAVE_MENUS.
94
952006-11-12 Romain Francoise <romain@orebokech.com>
96
97 * xselect.c (selection-coding-system): Fix docstring.
98
992006-11-12 Juanma Barranquero <lekktu@gmail.com>
100
101 * category.c (Fchar_category_set): Improve arg/docstring consistency.
102
103 * data.c (Flogxor):
104 * fns.c (Frandom, Flength, Fsafe_length, Fstring_bytes)
105 (Fstring_equal, Fcompare_strings, Fstring_lessp, Fcopy_sequence)
106 (Fstring_make_unibyte): Fix typos in docstrings.
107
1082006-11-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
109
110 * xterm.h (struct x_display_info): Fix indentation.
111
112 * xterm.c (do_ewmh_fullscreen, XTfullscreen_hook): New functions.
113 (x_check_fullscreen): Call do_ewmh_fullscreen.
114 (x_initialize): Set fullscreen_hook to XTfullscreen_hook.
115
116 * frame.c (x_set_fullscreen): Call fullscreen_hook if set.
117
118 * term.c: Define fullscreen_hook.
119 (syms_of_term): Initialize fullscreen_hook to NULL.
120
121 * termhooks.h: Add fullscreen_hook.
122
1232006-11-08 Juanma Barranquero <lekktu@gmail.com>
124
125 * bytecode.c (Fbyte_code):
126 * data.c (Fmakunbound): Use SYMBOL_CONSTANT_P macro.
127
12006-11-06 Juanma Barranquero <lekktu@gmail.com> 1282006-11-06 Juanma Barranquero <lekktu@gmail.com>
2 129
3 * lread.c (syms_of_lread): 130 * lread.c (syms_of_lread):
@@ -716,7 +843,7 @@
716 * editfns.c (Fsystem_name): Mention "host" in the doc string. 843 * editfns.c (Fsystem_name): Mention "host" in the doc string.
717 (syms_of_editfns) <system-name>: Likewise. 844 (syms_of_editfns) <system-name>: Likewise.
718 845
7192006-08-27 Martin Rudalics <rudalics@gmx.at> 8462006-09-08 Martin Rudalics <rudalics@gmx.at>
720 847
721 * xdisp.c (mouse_autoselect_window): Remove. 848 * xdisp.c (mouse_autoselect_window): Remove.
722 (Vmouse_autoselect_window): New variable. DEFVAR_LISP it. 849 (Vmouse_autoselect_window): New variable. DEFVAR_LISP it.
@@ -26367,6 +26494,7 @@ See ChangeLog.9 for earlier changes.
26367 26494
26368;; Local Variables: 26495;; Local Variables:
26369;; coding: iso-2022-7bit 26496;; coding: iso-2022-7bit
26497;; add-log-time-zone-rule: t
26370;; End: 26498;; End:
26371 26499
26372 Copyright (C) 2001, 2002, 2003, 2004, 2005, 26500 Copyright (C) 2001, 2002, 2003, 2004, 2005,
diff --git a/src/alloc.c b/src/alloc.c
index 94be9fa6132..8ebaac74c08 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -478,7 +478,7 @@ static int live_symbol_p P_ ((struct mem_node *, void *));
478static int live_float_p P_ ((struct mem_node *, void *)); 478static int live_float_p P_ ((struct mem_node *, void *));
479static int live_misc_p P_ ((struct mem_node *, void *)); 479static int live_misc_p P_ ((struct mem_node *, void *));
480static void mark_maybe_object P_ ((Lisp_Object)); 480static void mark_maybe_object P_ ((Lisp_Object));
481static void mark_memory P_ ((void *, void *)); 481static void mark_memory P_ ((void *, void *, int));
482static void mem_init P_ ((void)); 482static void mem_init P_ ((void));
483static struct mem_node *mem_insert P_ ((void *, void *, enum mem_type)); 483static struct mem_node *mem_insert P_ ((void *, void *, enum mem_type));
484static void mem_insert_fixup P_ ((struct mem_node *)); 484static void mem_insert_fixup P_ ((struct mem_node *));
@@ -4284,11 +4284,13 @@ mark_maybe_pointer (p)
4284} 4284}
4285 4285
4286 4286
4287/* Mark Lisp objects referenced from the address range START..END. */ 4287/* Mark Lisp objects referenced from the address range START+OFFSET..END
4288 or END+OFFSET..START. */
4288 4289
4289static void 4290static void
4290mark_memory (start, end) 4291mark_memory (start, end, offset)
4291 void *start, *end; 4292 void *start, *end;
4293 int offset;
4292{ 4294{
4293 Lisp_Object *p; 4295 Lisp_Object *p;
4294 void **pp; 4296 void **pp;
@@ -4307,7 +4309,7 @@ mark_memory (start, end)
4307 } 4309 }
4308 4310
4309 /* Mark Lisp_Objects. */ 4311 /* Mark Lisp_Objects. */
4310 for (p = (Lisp_Object *) start; (void *) p < end; ++p) 4312 for (p = (Lisp_Object *) ((char *) start + offset); (void *) p < end; ++p)
4311 mark_maybe_object (*p); 4313 mark_maybe_object (*p);
4312 4314
4313 /* Mark Lisp data pointed to. This is necessary because, in some 4315 /* Mark Lisp data pointed to. This is necessary because, in some
@@ -4328,7 +4330,7 @@ mark_memory (start, end)
4328 away. The only reference to the life string is through the 4330 away. The only reference to the life string is through the
4329 pointer `s'. */ 4331 pointer `s'. */
4330 4332
4331 for (pp = (void **) start; (void *) pp < end; ++pp) 4333 for (pp = (void **) ((char *) start + offset); (void *) pp < end; ++pp)
4332 mark_maybe_pointer (*pp); 4334 mark_maybe_pointer (*pp);
4333} 4335}
4334 4336
@@ -4507,7 +4509,11 @@ static void
4507mark_stack () 4509mark_stack ()
4508{ 4510{
4509 int i; 4511 int i;
4510 jmp_buf j; 4512 /* jmp_buf may not be aligned enough on darwin-ppc64 */
4513 union aligned_jmpbuf {
4514 Lisp_Object o;
4515 jmp_buf j;
4516 } j;
4511 volatile int stack_grows_down_p = (char *) &j > (char *) stack_base; 4517 volatile int stack_grows_down_p = (char *) &j > (char *) stack_base;
4512 void *end; 4518 void *end;
4513 4519
@@ -4538,7 +4544,7 @@ mark_stack ()
4538 } 4544 }
4539#endif /* GC_SETJMP_WORKS */ 4545#endif /* GC_SETJMP_WORKS */
4540 4546
4541 setjmp (j); 4547 setjmp (j.j);
4542 end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j; 4548 end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j;
4543#endif /* not GC_SAVE_REGISTERS_ON_STACK */ 4549#endif /* not GC_SAVE_REGISTERS_ON_STACK */
4544 4550
@@ -4553,7 +4559,7 @@ mark_stack ()
4553#endif 4559#endif
4554#endif 4560#endif
4555 for (i = 0; i < sizeof (Lisp_Object); i += GC_LISP_OBJECT_ALIGNMENT) 4561 for (i = 0; i < sizeof (Lisp_Object); i += GC_LISP_OBJECT_ALIGNMENT)
4556 mark_memory ((char *) stack_base + i, end); 4562 mark_memory (stack_base, end, i);
4557 /* Allow for marking a secondary stack, like the register stack on the 4563 /* Allow for marking a secondary stack, like the register stack on the
4558 ia64. */ 4564 ia64. */
4559#ifdef GC_MARK_SECONDARY_STACK 4565#ifdef GC_MARK_SECONDARY_STACK
diff --git a/src/bytecode.c b/src/bytecode.c
index 3ee9b5576b4..6476070be5d 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -597,7 +597,7 @@ If the third argument is incorrect, Emacs may crash. */)
597 if (SYMBOLP (sym) 597 if (SYMBOLP (sym)
598 && !EQ (val, Qunbound) 598 && !EQ (val, Qunbound)
599 && !XSYMBOL (sym)->indirect_variable 599 && !XSYMBOL (sym)->indirect_variable
600 && !XSYMBOL (sym)->constant 600 && !SYMBOL_CONSTANT_P (sym)
601 && !MISCP (XSYMBOL (sym)->value)) 601 && !MISCP (XSYMBOL (sym)->value))
602 XSYMBOL (sym)->value = val; 602 XSYMBOL (sym)->value = val;
603 else 603 else
diff --git a/src/category.c b/src/category.c
index b9f80982ee7..cb6385fdb25 100644
--- a/src/category.c
+++ b/src/category.c
@@ -280,7 +280,8 @@ char_category_set (c)
280} 280}
281 281
282DEFUN ("char-category-set", Fchar_category_set, Schar_category_set, 1, 1, 0, 282DEFUN ("char-category-set", Fchar_category_set, Schar_category_set, 1, 1, 0,
283 doc: /* Return the category set of CHAR. */) 283 doc: /* Return the category set of CHAR.
284usage: (char-category-set CHAR) */)
284 (ch) 285 (ch)
285 Lisp_Object ch; 286 Lisp_Object ch;
286{ 287{
diff --git a/src/coding.c b/src/coding.c
index 644f649ad36..28ab86c43fc 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -8184,7 +8184,7 @@ Return the corresponding character. */)
8184 8184
8185 8185
8186DEFUN ("encode-sjis-char", Fencode_sjis_char, Sencode_sjis_char, 1, 1, 0, 8186DEFUN ("encode-sjis-char", Fencode_sjis_char, Sencode_sjis_char, 1, 1, 0,
8187 doc: /* Encode a Japanese character CHAR to shift_jis encoding. 8187 doc: /* Encode a Japanese character CH to shift_jis encoding.
8188Return the corresponding code in SJIS. */) 8188Return the corresponding code in SJIS. */)
8189 (ch) 8189 (ch)
8190 Lisp_Object ch; 8190 Lisp_Object ch;
@@ -8252,7 +8252,7 @@ Return the corresponding character. */)
8252} 8252}
8253 8253
8254DEFUN ("encode-big5-char", Fencode_big5_char, Sencode_big5_char, 1, 1, 0, 8254DEFUN ("encode-big5-char", Fencode_big5_char, Sencode_big5_char, 1, 1, 0,
8255 doc: /* Encode the Big5 character CHAR to BIG5 coding system. 8255 doc: /* Encode the Big5 character CH to BIG5 coding system.
8256Return the corresponding character code in Big5. */) 8256Return the corresponding character code in Big5. */)
8257 (ch) 8257 (ch)
8258 Lisp_Object ch; 8258 Lisp_Object ch;
diff --git a/src/config.in b/src/config.in
index 106aeea920c..10135ade386 100644
--- a/src/config.in
+++ b/src/config.in
@@ -99,9 +99,6 @@ Boston, MA 02110-1301, USA. */
99/* Define to 1 if you have the `bzero' function. */ 99/* Define to 1 if you have the `bzero' function. */
100#undef HAVE_BZERO 100#undef HAVE_BZERO
101 101
102/* Define to 1 if CancelMenuTracking is available (Mac OSX). */
103#undef HAVE_CANCELMENUTRACKING
104
105/* Define to 1 if you are using the Carbon API on Mac OS X. */ 102/* Define to 1 if you are using the Carbon API on Mac OS X. */
106#undef HAVE_CARBON 103#undef HAVE_CARBON
107 104
diff --git a/src/data.c b/src/data.c
index 4a846207073..00ef0b1c822 100644
--- a/src/data.c
+++ b/src/data.c
@@ -606,7 +606,7 @@ Return SYMBOL. */)
606 register Lisp_Object symbol; 606 register Lisp_Object symbol;
607{ 607{
608 CHECK_SYMBOL (symbol); 608 CHECK_SYMBOL (symbol);
609 if (XSYMBOL (symbol)->constant) 609 if (SYMBOL_CONSTANT_P (symbol))
610 xsignal1 (Qsetting_constant, symbol); 610 xsignal1 (Qsetting_constant, symbol);
611 Fset (symbol, Qunbound); 611 Fset (symbol, Qunbound);
612 return symbol; 612 return symbol;
@@ -2673,7 +2673,7 @@ usage: (logior &rest INTS-OR-MARKERS) */)
2673DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0, 2673DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0,
2674 doc: /* Return bitwise-exclusive-or of all the arguments. 2674 doc: /* Return bitwise-exclusive-or of all the arguments.
2675Arguments may be integers, or markers converted to integers. 2675Arguments may be integers, or markers converted to integers.
2676usage: (logxor &rest INTS-OR-MARKERS) */) 2676usage: (logxor &rest INTS-OR-MARKERS) */)
2677 (nargs, args) 2677 (nargs, args)
2678 int nargs; 2678 int nargs;
2679 Lisp_Object *args; 2679 Lisp_Object *args;
diff --git a/src/editfns.c b/src/editfns.c
index 0206cd1b913..79a88604d8c 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3303,9 +3303,10 @@ static char *message_text;
3303static int message_length; 3303static int message_length;
3304 3304
3305DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, 3305DEFUN ("message", Fmessage, Smessage, 1, MANY, 0,
3306 doc: /* Print a one-line message at the bottom of the screen. 3306 doc: /* Display a message at the bottom of the screen.
3307The message also goes into the `*Messages*' buffer. 3307The message also goes into the `*Messages*' buffer.
3308\(In keyboard macros, that's all it does.) 3308\(In keyboard macros, that's all it does.)
3309Return the message.
3309 3310
3310The first argument is a format control string, and the rest are data 3311The first argument is a format control string, and the rest are data
3311to be formatted under control of the string. See `format' for details. 3312to be formatted under control of the string. See `format' for details.
diff --git a/src/fileio.c b/src/fileio.c
index 9b611bb7fd1..601c5b5de9d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1252,9 +1252,9 @@ See also the function `substitute-in-file-name'. */)
1252 } 1252 }
1253 else 1253 else
1254#endif /* NO_HYPHENS_IN_FILENAMES */ 1254#endif /* NO_HYPHENS_IN_FILENAMES */
1255 if (lbrack > rbrack && 1255 if (lbrack > rbrack
1256 ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') && 1256 && ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<')
1257 (p[1] == '.' || p[1] == ']' || p[1] == '>'))) 1257 && (p[1] == '.' || p[1] == ']' || p[1] == '>')))
1258 lose = 1; 1258 lose = 1;
1259#ifdef NO_HYPHENS_IN_FILENAMES 1259#ifdef NO_HYPHENS_IN_FILENAMES
1260 else 1260 else
@@ -1623,8 +1623,8 @@ See also the function `substitute-in-file-name'. */)
1623 else if (*p == '-' && *o != '.') 1623 else if (*p == '-' && *o != '.')
1624 *--p = '.'; 1624 *--p = '.';
1625 } 1625 }
1626 else if (p[0] == '-' && o[-1] == '.' && 1626 else if (p[0] == '-' && o[-1] == '.'
1627 (p[1] == '.' || p[1] == ']' || p[1] == '>')) 1627 && (p[1] == '.' || p[1] == ']' || p[1] == '>'))
1628 /* flush .foo.- ; leave - if stopped by '[' or '<' */ 1628 /* flush .foo.- ; leave - if stopped by '[' or '<' */
1629 { 1629 {
1630 do 1630 do
@@ -1639,9 +1639,9 @@ See also the function `substitute-in-file-name'. */)
1639 else 1639 else
1640 { 1640 {
1641#ifdef NO_HYPHENS_IN_FILENAMES 1641#ifdef NO_HYPHENS_IN_FILENAMES
1642 if (*p == '-' && 1642 if (*p == '-'
1643 o[-1] != '[' && o[-1] != '<' && o[-1] != '.' && 1643 && o[-1] != '[' && o[-1] != '<' && o[-1] != '.'
1644 p[1] != ']' && p[1] != '>' && p[1] != '.') 1644 && p[1] != ']' && p[1] != '>' && p[1] != '.')
1645 *p = '_'; 1645 *p = '_';
1646#endif /* NO_HYPHENS_IN_FILENAMES */ 1646#endif /* NO_HYPHENS_IN_FILENAMES */
1647 *o++ = *p++; 1647 *o++ = *p++;
@@ -1824,9 +1824,9 @@ See also the function `substitute-in-file-name'.")
1824 } 1824 }
1825 else 1825 else
1826#endif /* VMS4_4 */ 1826#endif /* VMS4_4 */
1827 if (lbrack > rbrack && 1827 if (lbrack > rbrack
1828 ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') && 1828 && ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<')
1829 (p[1] == '.' || p[1] == ']' || p[1] == '>'))) 1829 && (p[1] == '.' || p[1] == ']' || p[1] == '>')))
1830 lose = 1; 1830 lose = 1;
1831#ifndef VMS4_4 1831#ifndef VMS4_4
1832 else 1832 else
@@ -1995,8 +1995,8 @@ See also the function `substitute-in-file-name'.")
1995 else if (*p == '-' && *o != '.') 1995 else if (*p == '-' && *o != '.')
1996 *--p = '.'; 1996 *--p = '.';
1997 } 1997 }
1998 else if (p[0] == '-' && o[-1] == '.' && 1998 else if (p[0] == '-' && o[-1] == '.'
1999 (p[1] == '.' || p[1] == ']' || p[1] == '>')) 1999 && (p[1] == '.' || p[1] == ']' || p[1] == '>'))
2000 /* flush .foo.- ; leave - if stopped by '[' or '<' */ 2000 /* flush .foo.- ; leave - if stopped by '[' or '<' */
2001 { 2001 {
2002 do 2002 do
@@ -2011,9 +2011,9 @@ See also the function `substitute-in-file-name'.")
2011 else 2011 else
2012 { 2012 {
2013#ifndef VMS4_4 2013#ifndef VMS4_4
2014 if (*p == '-' && 2014 if (*p == '-'
2015 o[-1] != '[' && o[-1] != '<' && o[-1] != '.' && 2015 && o[-1] != '[' && o[-1] != '<' && o[-1] != '.'
2016 p[1] != ']' && p[1] != '>' && p[1] != '.') 2016 && p[1] != ']' && p[1] != '>' && p[1] != '.')
2017 *p = '_'; 2017 *p = '_';
2018#endif /* VMS4_4 */ 2018#endif /* VMS4_4 */
2019 *o++ = *p++; 2019 *o++ = *p++;
@@ -2033,8 +2033,8 @@ See also the function `substitute-in-file-name'.")
2033 o = target; 2033 o = target;
2034 p++; 2034 p++;
2035 } 2035 }
2036 else if (p[0] == '/' && p[1] == '.' && 2036 else if (p[0] == '/' && p[1] == '.'
2037 (p[2] == '/' || p[2] == 0)) 2037 && (p[2] == '/' || p[2] == 0))
2038 p += 2; 2038 p += 2;
2039 else if (!strncmp (p, "/..", 3) 2039 else if (!strncmp (p, "/..", 3)
2040 /* `/../' is the "superroot" on certain file systems. */ 2040 /* `/../' is the "superroot" on certain file systems. */
diff --git a/src/fns.c b/src/fns.c
index 64223d83e8c..e6b83b8e4e1 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -103,7 +103,7 @@ DEFUN ("random", Frandom, Srandom, 0, 1, 0,
103All integers representable in Lisp are equally likely. 103All integers representable in Lisp are equally likely.
104 On most systems, this is 29 bits' worth. 104 On most systems, this is 29 bits' worth.
105With positive integer argument N, return random number in interval [0,N). 105With positive integer argument N, return random number in interval [0,N).
106With argument t, set the random number seed from the current time and pid. */) 106With argument t, set the random number seed from the current time and pid. */)
107 (n) 107 (n)
108 Lisp_Object n; 108 Lisp_Object n;
109{ 109{
@@ -140,7 +140,7 @@ DEFUN ("length", Flength, Slength, 1, 1, 0,
140A byte-code function object is also allowed. 140A byte-code function object is also allowed.
141If the string contains multibyte characters, this is not necessarily 141If the string contains multibyte characters, this is not necessarily
142the number of bytes in the string; it is the number of characters. 142the number of bytes in the string; it is the number of characters.
143To get the number of bytes, use `string-bytes'. */) 143To get the number of bytes, use `string-bytes'. */)
144 (sequence) 144 (sequence)
145 register Lisp_Object sequence; 145 register Lisp_Object sequence;
146{ 146{
@@ -191,7 +191,7 @@ DEFUN ("safe-length", Fsafe_length, Ssafe_length, 1, 1, 0,
191 doc: /* Return the length of a list, but avoid error or infinite loop. 191 doc: /* Return the length of a list, but avoid error or infinite loop.
192This function never gets an error. If LIST is not really a list, 192This function never gets an error. If LIST is not really a list,
193it returns 0. If LIST is circular, it returns a finite value 193it returns 0. If LIST is circular, it returns a finite value
194which is at least the number of distinct elements. */) 194which is at least the number of distinct elements. */)
195 (list) 195 (list)
196 Lisp_Object list; 196 Lisp_Object list;
197{ 197{
@@ -215,7 +215,7 @@ which is at least the number of distinct elements. */)
215 215
216DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0, 216DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0,
217 doc: /* Return the number of bytes in STRING. 217 doc: /* Return the number of bytes in STRING.
218If STRING is multibyte, this may be greater than the length of STRING. */) 218If STRING is multibyte, this may be greater than the length of STRING. */)
219 (string) 219 (string)
220 Lisp_Object string; 220 Lisp_Object string;
221{ 221{
@@ -226,7 +226,7 @@ If STRING is multibyte, this may be greater than the length of STRING. */)
226DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0, 226DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0,
227 doc: /* Return t if two strings have identical contents. 227 doc: /* Return t if two strings have identical contents.
228Case is significant, but text properties are ignored. 228Case is significant, but text properties are ignored.
229Symbols are also allowed; their print names are used instead. */) 229Symbols are also allowed; their print names are used instead. */)
230 (s1, s2) 230 (s1, s2)
231 register Lisp_Object s1, s2; 231 register Lisp_Object s1, s2;
232{ 232{
@@ -258,7 +258,7 @@ The value is t if the strings (or specified portions) match.
258If string STR1 is less, the value is a negative number N; 258If string STR1 is less, the value is a negative number N;
259 - 1 - N is the number of characters that match at the beginning. 259 - 1 - N is the number of characters that match at the beginning.
260If string STR1 is greater, the value is a positive number N; 260If string STR1 is greater, the value is a positive number N;
261 N - 1 is the number of characters that match at the beginning. */) 261 N - 1 is the number of characters that match at the beginning. */)
262 (str1, start1, end1, str2, start2, end2, ignore_case) 262 (str1, start1, end1, str2, start2, end2, ignore_case)
263 Lisp_Object str1, start1, end1, start2, str2, end2, ignore_case; 263 Lisp_Object str1, start1, end1, start2, str2, end2, ignore_case;
264{ 264{
@@ -350,7 +350,7 @@ If string STR1 is greater, the value is a positive number N;
350DEFUN ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0, 350DEFUN ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0,
351 doc: /* Return t if first arg string is less than second in lexicographic order. 351 doc: /* Return t if first arg string is less than second in lexicographic order.
352Case is significant. 352Case is significant.
353Symbols are also allowed; their print names are used instead. */) 353Symbols are also allowed; their print names are used instead. */)
354 (s1, s2) 354 (s1, s2)
355 register Lisp_Object s1, s2; 355 register Lisp_Object s1, s2;
356{ 356{
@@ -390,6 +390,8 @@ Symbols are also allowed; their print names are used instead. */)
390 the arguments for the invocations of this function, whereas it 390 the arguments for the invocations of this function, whereas it
391 expects these values on the stack. */ 391 expects these values on the stack. */
392static Lisp_Object concat () __attribute__((noinline)); 392static Lisp_Object concat () __attribute__((noinline));
393#else /* !__GNUC__ */
394static Lisp_Object concat ();
393#endif 395#endif
394 396
395/* ARGSUSED */ 397/* ARGSUSED */
@@ -464,7 +466,7 @@ usage: (vconcat &rest SEQUENCES) */)
464DEFUN ("copy-sequence", Fcopy_sequence, Scopy_sequence, 1, 1, 0, 466DEFUN ("copy-sequence", Fcopy_sequence, Scopy_sequence, 1, 1, 0,
465 doc: /* Return a copy of a list, vector, string or char-table. 467 doc: /* Return a copy of a list, vector, string or char-table.
466The elements of a list or vector are not copied; they are shared 468The elements of a list or vector are not copied; they are shared
467with the original. */) 469with the original. */)
468 (arg) 470 (arg)
469 Lisp_Object arg; 471 Lisp_Object arg;
470{ 472{
@@ -1031,7 +1033,7 @@ DEFUN ("string-make-unibyte", Fstring_make_unibyte, Sstring_make_unibyte,
1031Multibyte character codes are converted to unibyte according to 1033Multibyte character codes are converted to unibyte according to
1032`nonascii-translation-table' or, if that is nil, `nonascii-insert-offset'. 1034`nonascii-translation-table' or, if that is nil, `nonascii-insert-offset'.
1033If the lookup in the translation table fails, this function takes just 1035If the lookup in the translation table fails, this function takes just
1034the low 8 bits of each character. */) 1036the low 8 bits of each character. */)
1035 (string) 1037 (string)
1036 Lisp_Object string; 1038 Lisp_Object string;
1037{ 1039{
diff --git a/src/frame.c b/src/frame.c
index 618022b28b6..eebfd8eeb13 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3047,6 +3047,9 @@ x_set_fullscreen (f, new_value, old_value)
3047 f->want_fullscreen = FULLSCREEN_WIDTH; 3047 f->want_fullscreen = FULLSCREEN_WIDTH;
3048 else if (EQ (new_value, Qfullheight)) 3048 else if (EQ (new_value, Qfullheight))
3049 f->want_fullscreen = FULLSCREEN_HEIGHT; 3049 f->want_fullscreen = FULLSCREEN_HEIGHT;
3050
3051 if (fullscreen_hook != NULL)
3052 fullscreen_hook (f);
3050} 3053}
3051 3054
3052 3055
diff --git a/src/indent.c b/src/indent.c
index 6a3cda9e9d5..368609bad64 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2088,10 +2088,10 @@ whether or not it is currently displayed in some window. */)
2088 it_start = IT_CHARPOS (it); 2088 it_start = IT_CHARPOS (it);
2089 2089
2090 /* We expect the call to move_it_to, further down, to overshoot 2090 /* We expect the call to move_it_to, further down, to overshoot
2091 if the starting point is on an image, stretch glyph, or Lisp 2091 if the starting point is on an image, stretch glyph,
2092 string. We won't need to backtrack in this situation, except 2092 composition, or Lisp string. We won't need to backtrack in
2093 for one corner case: when the Lisp string contains a 2093 this situation, except for one corner case: when the Lisp
2094 newline. */ 2094 string contains a newline. */
2095 if (it.method == GET_FROM_STRING) 2095 if (it.method == GET_FROM_STRING)
2096 { 2096 {
2097 const char *s = SDATA (it.string); 2097 const char *s = SDATA (it.string);
@@ -2104,7 +2104,8 @@ whether or not it is currently displayed in some window. */)
2104 } 2104 }
2105 else 2105 else
2106 it_overshoot_expected_p = (it.method == GET_FROM_IMAGE 2106 it_overshoot_expected_p = (it.method == GET_FROM_IMAGE
2107 || it.method == GET_FROM_STRETCH); 2107 || it.method == GET_FROM_STRETCH
2108 || it.method == GET_FROM_COMPOSITION);
2108 2109
2109 reseat_at_previous_visible_line_start (&it); 2110 reseat_at_previous_visible_line_start (&it);
2110 it.current_x = it.hpos = 0; 2111 it.current_x = it.hpos = 0;
diff --git a/src/macfns.c b/src/macfns.c
index ca55bced6c7..2148ec3e1ad 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -3092,18 +3092,30 @@ If omitted or nil, that stands for the selected frame's display. */)
3092 Lisp_Object display; 3092 Lisp_Object display;
3093{ 3093{
3094 struct mac_display_info *dpyinfo = check_x_display_info (display); 3094 struct mac_display_info *dpyinfo = check_x_display_info (display);
3095
3095 /* Only of the main display. */ 3096 /* Only of the main display. */
3096#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 3097#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
3097 CGSize size; 3098#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
3099 if (CGDisplayScreenSize != NULL)
3100#endif
3101 {
3102 CGSize size;
3098 3103
3099 BLOCK_INPUT; 3104 BLOCK_INPUT;
3100 size = CGDisplayScreenSize (kCGDirectMainDisplay); 3105 size = CGDisplayScreenSize (kCGDirectMainDisplay);
3101 UNBLOCK_INPUT; 3106 UNBLOCK_INPUT;
3102 3107
3103 return make_number ((int) (size.height + .5f)); 3108 return make_number ((int) (size.height + .5f));
3104#else 3109 }
3105 /* This is an approximation. */ 3110#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
3106 return make_number ((int) (dpyinfo->height * 25.4 / dpyinfo->resy)); 3111 else
3112#endif
3113#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
3114#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
3115 {
3116 /* This is an approximation. */
3117 return make_number ((int) (dpyinfo->height * 25.4 / dpyinfo->resy));
3118 }
3107#endif 3119#endif
3108} 3120}
3109 3121
@@ -3116,18 +3128,30 @@ If omitted or nil, that stands for the selected frame's display. */)
3116 Lisp_Object display; 3128 Lisp_Object display;
3117{ 3129{
3118 struct mac_display_info *dpyinfo = check_x_display_info (display); 3130 struct mac_display_info *dpyinfo = check_x_display_info (display);
3131
3119 /* Only of the main display. */ 3132 /* Only of the main display. */
3120#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 3133#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
3121 CGSize size; 3134#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
3135 if (CGDisplayScreenSize != NULL)
3136#endif
3137 {
3138 CGSize size;
3122 3139
3123 BLOCK_INPUT; 3140 BLOCK_INPUT;
3124 size = CGDisplayScreenSize (kCGDirectMainDisplay); 3141 size = CGDisplayScreenSize (kCGDirectMainDisplay);
3125 UNBLOCK_INPUT; 3142 UNBLOCK_INPUT;
3126 3143
3127 return make_number ((int) (size.width + .5f)); 3144 return make_number ((int) (size.width + .5f));
3128#else 3145 }
3129 /* This is an approximation. */ 3146#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
3130 return make_number ((int) (dpyinfo->width * 25.4 / dpyinfo->resx)); 3147 else
3148#endif
3149#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
3150#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
3151 {
3152 /* This is an approximation. */
3153 return make_number ((int) (dpyinfo->width * 25.4 / dpyinfo->resx));
3154 }
3131#endif 3155#endif
3132} 3156}
3133 3157
diff --git a/src/macmenu.c b/src/macmenu.c
index d8303dbdc25..14bfe92cb25 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -319,7 +319,7 @@ restore_menu_items (saved)
319 menu_items_used = XINT (XCAR (saved)); 319 menu_items_used = XINT (XCAR (saved));
320 saved = XCDR (saved); 320 saved = XCDR (saved);
321 menu_items_n_panes = XINT (XCAR (saved)); 321 menu_items_n_panes = XINT (XCAR (saved));
322 saved = XCDR (saved); 322 saved = XCDR (saved);
323 menu_items_submenu_depth = XINT (XCAR (saved)); 323 menu_items_submenu_depth = XINT (XCAR (saved));
324 return Qnil; 324 return Qnil;
325} 325}
@@ -1453,7 +1453,7 @@ update_submenu_strings (first_wv)
1453/* Event handler function that pops down a menu on C-g. We can only pop 1453/* Event handler function that pops down a menu on C-g. We can only pop
1454 down menus if CancelMenuTracking is present (OSX 10.3 or later). */ 1454 down menus if CancelMenuTracking is present (OSX 10.3 or later). */
1455 1455
1456#ifdef HAVE_CANCELMENUTRACKING 1456#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
1457static pascal OSStatus 1457static pascal OSStatus
1458menu_quit_handler (nextHandler, theEvent, userData) 1458menu_quit_handler (nextHandler, theEvent, userData)
1459 EventHandlerCallRef nextHandler; 1459 EventHandlerCallRef nextHandler;
@@ -1487,7 +1487,7 @@ menu_quit_handler (nextHandler, theEvent, userData)
1487 1487
1488 return CallNextEventHandler (nextHandler, theEvent); 1488 return CallNextEventHandler (nextHandler, theEvent);
1489} 1489}
1490#endif /* HAVE_CANCELMENUTRACKING */ 1490#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
1491 1491
1492/* Add event handler to all menus that belong to KIND so we can detect C-g. 1492/* Add event handler to all menus that belong to KIND so we can detect C-g.
1493 MENU_HANDLE is the root menu of the tracking session to dismiss 1493 MENU_HANDLE is the root menu of the tracking session to dismiss
@@ -1499,11 +1499,15 @@ install_menu_quit_handler (kind, menu_handle)
1499 enum mac_menu_kind kind; 1499 enum mac_menu_kind kind;
1500 MenuHandle menu_handle; 1500 MenuHandle menu_handle;
1501{ 1501{
1502#ifdef HAVE_CANCELMENUTRACKING 1502#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
1503 static const EventTypeSpec typesList[] = 1503 static const EventTypeSpec typesList[] =
1504 {{kEventClassKeyboard, kEventRawKeyDown}}; 1504 {{kEventClassKeyboard, kEventRawKeyDown}};
1505 int id; 1505 int id;
1506 1506
1507#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
1508 if (CancelMenuTracking == NULL)
1509 return;
1510#endif
1507 for (id = min_menu_id[kind]; id < min_menu_id[kind + 1]; id++) 1511 for (id = min_menu_id[kind]; id < min_menu_id[kind + 1]; id++)
1508 { 1512 {
1509 MenuHandle menu = GetMenuHandle (id); 1513 MenuHandle menu = GetMenuHandle (id);
@@ -1512,9 +1516,9 @@ install_menu_quit_handler (kind, menu_handle)
1512 break; 1516 break;
1513 InstallMenuEventHandler (menu, menu_quit_handler, 1517 InstallMenuEventHandler (menu, menu_quit_handler,
1514 GetEventTypeCount (typesList), 1518 GetEventTypeCount (typesList),
1515 typesList, menu_handle, NULL); 1519 typesList, menu_handle, NULL);
1516 } 1520 }
1517#endif /* HAVE_CANCELMENUTRACKING */ 1521#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
1518} 1522}
1519 1523
1520/* Set the contents of the menubar widgets of frame F. 1524/* Set the contents of the menubar widgets of frame F.
diff --git a/src/macterm.c b/src/macterm.c
index 87419cac365..ff36e9501c6 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -1362,20 +1362,31 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width, overstrike_p)
1362 if (GC_FONT (gc)->mac_fontsize <= cg_text_anti_aliasing_threshold) 1362 if (GC_FONT (gc)->mac_fontsize <= cg_text_anti_aliasing_threshold)
1363 CGContextSetShouldAntialias (context, false); 1363 CGContextSetShouldAntialias (context, false);
1364#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 1364#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
1365 CGContextSetTextPosition (context, gx, gy); 1365#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
1366 CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars); 1366 if (CGContextShowGlyphsWithAdvances != NULL)
1367 if (overstrike_p) 1367#endif
1368 { 1368 {
1369 CGContextSetTextPosition (context, gx + 1.0f, gy); 1369 CGContextSetTextPosition (context, gx, gy);
1370 CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars); 1370 CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
1371 if (overstrike_p)
1372 {
1373 CGContextSetTextPosition (context, gx + 1.0f, gy);
1374 CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
1375 }
1371 } 1376 }
1372#else 1377#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
1373 for (i = 0; i < nchars; i++) 1378 else
1379#endif
1380#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
1381#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
1374 { 1382 {
1375 CGContextShowGlyphsAtPoint (context, gx, gy, glyphs + i, 1); 1383 for (i = 0; i < nchars; i++)
1376 if (overstrike_p) 1384 {
1377 CGContextShowGlyphsAtPoint (context, gx + 1.0f, gy, glyphs + i, 1); 1385 CGContextShowGlyphsAtPoint (context, gx, gy, glyphs + i, 1);
1378 gx += advances[i].width; 1386 if (overstrike_p)
1387 CGContextShowGlyphsAtPoint (context, gx + 1.0f, gy, glyphs + i, 1);
1388 gx += advances[i].width;
1389 }
1379 } 1390 }
1380#endif 1391#endif
1381#if USE_CG_DRAWING 1392#if USE_CG_DRAWING
diff --git a/src/minibuf.c b/src/minibuf.c
index f6824ae351b..316f487e0ff 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1683,7 +1683,7 @@ Lisp_Object Vminibuffer_completing_file_name;
1683DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, 1683DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0,
1684 doc: /* Read a string in the minibuffer, with completion. 1684 doc: /* Read a string in the minibuffer, with completion.
1685PROMPT is a string to prompt with; normally it ends in a colon and a space. 1685PROMPT is a string to prompt with; normally it ends in a colon and a space.
1686TABLE can be an list of strings, an alist, an obarray or a hash table. 1686TABLE can be a list of strings, an alist, an obarray or a hash table.
1687TABLE can also be a function to do the completion itself. 1687TABLE can also be a function to do the completion itself.
1688PREDICATE limits completion to a subset of TABLE. 1688PREDICATE limits completion to a subset of TABLE.
1689See `try-completion' and `all-completions' for more details 1689See `try-completion' and `all-completions' for more details
diff --git a/src/process.c b/src/process.c
index 4497c1d38c0..7042077471c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -7060,7 +7060,7 @@ syms_of_process ()
7060 7060
7061 DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes, 7061 DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes,
7062 doc: /* *Non-nil means delete processes immediately when they exit. 7062 doc: /* *Non-nil means delete processes immediately when they exit.
7063nil means don't delete them until `list-processes' is run. */); 7063A value of nil means don't delete them until `list-processes' is run. */);
7064 7064
7065 delete_exited_processes = 1; 7065 delete_exited_processes = 1;
7066 7066
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 55d9a725293..7116d24c718 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -377,7 +377,7 @@ Boston, MA 02110-1301, USA. */
377 extern void *__libc_ia64_register_backing_store_base; \ 377 extern void *__libc_ia64_register_backing_store_base; \
378 __builtin_ia64_flushrs (); \ 378 __builtin_ia64_flushrs (); \
379 mark_memory (__libc_ia64_register_backing_store_base, \ 379 mark_memory (__libc_ia64_register_backing_store_base, \
380 __builtin_ia64_bsp ()); \ 380 __builtin_ia64_bsp (), 0); \
381 } while (0) 381 } while (0)
382#endif 382#endif
383#endif 383#endif
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index fa4ca565171..461df7acfba 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -279,7 +279,7 @@ Boston, MA 02110-1301, USA. */
279#define HAVE_STRFTIME 1 279#define HAVE_STRFTIME 1
280 280
281#define LOCALTIME_CACHE 281#define LOCALTIME_CACHE
282#undef HAVE_INET_SOCKETS 282#define HAVE_INET_SOCKETS 1
283 283
284#undef HAVE_AIX_SMT_EXP 284#undef HAVE_AIX_SMT_EXP
285 285
diff --git a/src/search.c b/src/search.c
index 7c1090aa2bf..15a7d54852a 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1534,7 +1534,7 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte)
1534 int this_len = len; 1534 int this_len = len;
1535 unsigned char *p = pat; 1535 unsigned char *p = pat;
1536 1536
1537 if (pos - len < lim) 1537 if (this_pos < lim || this_pos_byte < lim_byte)
1538 goto stop; 1538 goto stop;
1539 1539
1540 while (this_len > 0) 1540 while (this_len > 0)
diff --git a/src/term.c b/src/term.c
index 06696c32d15..7f25eb36328 100644
--- a/src/term.c
+++ b/src/term.c
@@ -193,6 +193,11 @@ void (*frame_rehighlight_hook) P_ ((FRAME_PTR f));
193 193
194void (*frame_raise_lower_hook) P_ ((FRAME_PTR f, int raise)); 194void (*frame_raise_lower_hook) P_ ((FRAME_PTR f, int raise));
195 195
196/* If the value of the frame parameter changed, whis hook is called.
197 For example, if going from fullscreen to not fullscreen this hook
198 may do something OS dependent, like extended window manager hints on X11. */
199void (*fullscreen_hook) P_ ((struct frame *f));
200
196/* Set the vertical scroll bar for WINDOW to have its upper left corner 201/* Set the vertical scroll bar for WINDOW to have its upper left corner
197 at (TOP, LEFT), and be LENGTH rows high. Set its handle to 202 at (TOP, LEFT), and be LENGTH rows high. Set its handle to
198 indicate that we are displaying PORTION characters out of a total 203 indicate that we are displaying PORTION characters out of a total
@@ -2876,6 +2881,8 @@ bigger, or it may make it blink, or it may do nothing at all. */);
2876 defsubr (&Stty_display_color_p); 2881 defsubr (&Stty_display_color_p);
2877 defsubr (&Stty_display_color_cells); 2882 defsubr (&Stty_display_color_cells);
2878 defsubr (&Stty_no_underline); 2883 defsubr (&Stty_no_underline);
2884
2885 fullscreen_hook = NULL;
2879} 2886}
2880 2887
2881/* arch-tag: 498e7449-6f2e-45e2-91dd-b7d4ca488193 2888/* arch-tag: 498e7449-6f2e-45e2-91dd-b7d4ca488193
diff --git a/src/termhooks.h b/src/termhooks.h
index de43d580c9b..2b9e947996e 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -120,6 +120,11 @@ extern void (*frame_rehighlight_hook) P_ ((struct frame *));
120 windows. */ 120 windows. */
121extern void (*frame_raise_lower_hook) P_ ((struct frame *f, int raise)); 121extern void (*frame_raise_lower_hook) P_ ((struct frame *f, int raise));
122 122
123/* If the value of the frame parameter changed, whis hook is called.
124 For example, if going from fullscreen to not fullscreen this hook
125 may do something OS dependent, like extended window manager hints on X11. */
126extern void (*fullscreen_hook) P_ ((struct frame *f));
127
123 128
124/* Scroll bar hooks. */ 129/* Scroll bar hooks. */
125 130
diff --git a/src/xfaces.c b/src/xfaces.c
index 1123e6649e9..6c04a91a125 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6587,7 +6587,7 @@ face for italic. */)
6587 (attributes, display) 6587 (attributes, display)
6588 Lisp_Object attributes, display; 6588 Lisp_Object attributes, display;
6589{ 6589{
6590 int supports, i; 6590 int supports = 0, i;
6591 Lisp_Object frame; 6591 Lisp_Object frame;
6592 struct frame *f; 6592 struct frame *f;
6593 struct face *def_face; 6593 struct face *def_face;
diff --git a/src/xmenu.c b/src/xmenu.c
index 829a6653767..5066c9076e3 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -822,7 +822,7 @@ no quit occurs and `x-popup-menu' returns nil. */)
822 int xpos = 0, ypos = 0; 822 int xpos = 0, ypos = 0;
823 Lisp_Object title; 823 Lisp_Object title;
824 char *error_name = NULL; 824 char *error_name = NULL;
825 Lisp_Object selection; 825 Lisp_Object selection = Qnil;
826 FRAME_PTR f = NULL; 826 FRAME_PTR f = NULL;
827 Lisp_Object x, y, window; 827 Lisp_Object x, y, window;
828 int keymaps = 0; 828 int keymaps = 0;
@@ -1488,14 +1488,6 @@ x_activate_menubar (f)
1488 f->output_data.x->saved_menu_event->type = 0; 1488 f->output_data.x->saved_menu_event->type = 0;
1489} 1489}
1490 1490
1491/* Detect if a dialog or menu has been posted. */
1492
1493int
1494popup_activated ()
1495{
1496 return popup_activated_flag;
1497}
1498
1499/* This callback is invoked when the user selects a menubar cascade 1491/* This callback is invoked when the user selects a menubar cascade
1500 pushbutton, but before the pulldown menu is posted. */ 1492 pushbutton, but before the pulldown menu is posted. */
1501 1493
@@ -3762,6 +3754,13 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
3762 3754
3763#endif /* HAVE_MENUS */ 3755#endif /* HAVE_MENUS */
3764 3756
3757/* Detect if a dialog or menu has been posted. */
3758
3759int
3760popup_activated ()
3761{
3762 return popup_activated_flag;
3763}
3765 3764
3766/* The following is used by delayed window autoselection. */ 3765/* The following is used by delayed window autoselection. */
3767 3766
diff --git a/src/xselect.c b/src/xselect.c
index 022226946a9..cb76e229e55 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -123,8 +123,8 @@ Lisp_Object QCUT_BUFFER0, QCUT_BUFFER1, QCUT_BUFFER2, QCUT_BUFFER3,
123 123
124static Lisp_Object Vx_lost_selection_functions; 124static Lisp_Object Vx_lost_selection_functions;
125static Lisp_Object Vx_sent_selection_functions; 125static Lisp_Object Vx_sent_selection_functions;
126/* Coding system for communicating with other X clients via cutbuffer, 126/* Coding system for communicating with other X clients via selection
127 selection, and clipboard. */ 127 and clipboard. */
128static Lisp_Object Vselection_coding_system; 128static Lisp_Object Vselection_coding_system;
129 129
130/* Coding system for the next communicating with other X clients. */ 130/* Coding system for the next communicating with other X clients. */
@@ -2975,8 +2975,8 @@ it merely informs you that they have happened. */);
2975 2975
2976 DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, 2976 DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system,
2977 doc: /* Coding system for communicating with other X clients. 2977 doc: /* Coding system for communicating with other X clients.
2978When sending or receiving text via cut_buffer, selection, and clipboard, 2978When sending or receiving text via selection and clipboard, the text is
2979the text is encoded or decoded by this coding system. 2979encoded or decoded by this coding system.
2980The default value is `compound-text-with-extensions'. */); 2980The default value is `compound-text-with-extensions'. */);
2981 Vselection_coding_system = intern ("compound-text-with-extensions"); 2981 Vselection_coding_system = intern ("compound-text-with-extensions");
2982 2982
diff --git a/src/xterm.c b/src/xterm.c
index 8849ef3dab4..6fdaaa83d93 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8595,6 +8595,119 @@ x_set_offset (f, xoff, yoff, change_gravity)
8595 UNBLOCK_INPUT; 8595 UNBLOCK_INPUT;
8596} 8596}
8597 8597
8598/* Do fullscreen as specified in extended window manager hints */
8599static int
8600do_ewmh_fullscreen (f)
8601 struct frame *f;
8602{
8603 int have_net_atom = FRAME_X_DISPLAY_INFO (f)->have_net_atoms;
8604
8605 if (!have_net_atom)
8606 {
8607 int num;
8608 Atom *atoms = XListProperties (FRAME_X_DISPLAY (f),
8609 FRAME_X_DISPLAY_INFO (f)->root_window,
8610 &num);
8611 if (atoms && num > 0)
8612 {
8613 char **names = (char **) xmalloc (num * sizeof(*names));
8614 if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names))
8615 {
8616 int i;
8617 for (i = 0; i < num; ++i)
8618 {
8619 if (!have_net_atom)
8620 have_net_atom = strncmp (names[i], "_NET_", 5) == 0;
8621 XFree (names[i]);
8622 }
8623 }
8624 xfree (names);
8625 }
8626 if (atoms)
8627 XFree (atoms);
8628
8629 FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom;
8630 }
8631
8632 if (have_net_atom)
8633 {
8634 Lisp_Object frame;
8635 const char *atom = "_NET_WM_STATE";
8636 const char *fs = "_NET_WM_STATE_FULLSCREEN";
8637 const char *fw = "_NET_WM_STATE_MAXIMIZED_HORZ";
8638 const char *fh = "_NET_WM_STATE_MAXIMIZED_VERT";
8639 const char *what = NULL;
8640
8641 XSETFRAME (frame, f);
8642
8643 /* If there are _NET_ atoms we assume we have extended window manager
8644 hints. */
8645 switch (f->want_fullscreen)
8646 {
8647 case FULLSCREEN_BOTH:
8648 what = fs;
8649 break;
8650 case FULLSCREEN_WIDTH:
8651 what = fw;
8652 break;
8653 case FULLSCREEN_HEIGHT:
8654 what = fh;
8655 break;
8656 }
8657
8658 Fx_send_client_event (frame, make_number (0), frame,
8659 make_unibyte_string (atom, strlen (atom)),
8660 make_number (32),
8661 Fcons (make_number (0), /* Remove */
8662 Fcons
8663 (make_unibyte_string (fs,
8664 strlen (fs)),
8665 Qnil)));
8666 Fx_send_client_event (frame, make_number (0), frame,
8667 make_unibyte_string (atom, strlen (atom)),
8668 make_number (32),
8669 Fcons (make_number (0), /* Remove */
8670 Fcons
8671 (make_unibyte_string (fh,
8672 strlen (fh)),
8673 Qnil)));
8674 Fx_send_client_event (frame, make_number (0), frame,
8675 make_unibyte_string (atom, strlen (atom)),
8676 make_number (32),
8677 Fcons (make_number (0), /* Remove */
8678 Fcons
8679 (make_unibyte_string (fw,
8680 strlen (fw)),
8681 Qnil)));
8682 f->want_fullscreen = FULLSCREEN_NONE;
8683 if (what != NULL)
8684 Fx_send_client_event (frame, make_number (0), frame,
8685 make_unibyte_string (atom, strlen (atom)),
8686 make_number (32),
8687 Fcons (make_number (1), /* Add */
8688 Fcons
8689 (make_unibyte_string (what,
8690 strlen (what)),
8691 Qnil)));
8692 }
8693
8694 return have_net_atom;
8695}
8696
8697static void
8698XTfullscreen_hook (f)
8699 FRAME_PTR f;
8700{
8701 if (f->async_visible)
8702 {
8703 BLOCK_INPUT;
8704 do_ewmh_fullscreen (f);
8705 x_sync (f);
8706 UNBLOCK_INPUT;
8707 }
8708}
8709
8710
8598/* Check if we need to resize the frame due to a fullscreen request. 8711/* Check if we need to resize the frame due to a fullscreen request.
8599 If so needed, resize the frame. */ 8712 If so needed, resize the frame. */
8600static void 8713static void
@@ -8605,6 +8718,9 @@ x_check_fullscreen (f)
8605 { 8718 {
8606 int width, height, ign; 8719 int width, height, ign;
8607 8720
8721 if (do_ewmh_fullscreen (f))
8722 return;
8723
8608 x_real_positions (f, &f->left_pos, &f->top_pos); 8724 x_real_positions (f, &f->left_pos, &f->top_pos);
8609 8725
8610 x_fullscreen_adjust (f, &width, &height, &ign, &ign); 8726 x_fullscreen_adjust (f, &width, &height, &ign, &ign);
@@ -11398,6 +11514,7 @@ x_initialize ()
11398 condemn_scroll_bars_hook = XTcondemn_scroll_bars; 11514 condemn_scroll_bars_hook = XTcondemn_scroll_bars;
11399 redeem_scroll_bar_hook = XTredeem_scroll_bar; 11515 redeem_scroll_bar_hook = XTredeem_scroll_bar;
11400 judge_scroll_bars_hook = XTjudge_scroll_bars; 11516 judge_scroll_bars_hook = XTjudge_scroll_bars;
11517 fullscreen_hook = XTfullscreen_hook;
11401 11518
11402 scroll_region_ok = 1; /* we'll scroll partial frames */ 11519 scroll_region_ok = 1; /* we'll scroll partial frames */
11403 char_ins_del_ok = 1; 11520 char_ins_del_ok = 1;
diff --git a/src/xterm.h b/src/xterm.h
index 7f8f0945aef..35ab0816286 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -391,10 +391,12 @@ struct x_display_info
391 } wm_type; 391 } wm_type;
392 392
393 393
394 /* Atoms that are drag and drop atoms */ 394 /* Atoms that are drag and drop atoms */
395 Atom *x_dnd_atoms; 395 Atom *x_dnd_atoms;
396 size_t x_dnd_atoms_size; 396 size_t x_dnd_atoms_size;
397 size_t x_dnd_atoms_length; 397 size_t x_dnd_atoms_length;
398
399 int have_net_atoms;
398}; 400};
399 401
400#ifdef HAVE_X_I18N 402#ifdef HAVE_X_I18N