aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2006-12-16 01:29:26 +0000
committerMiles Bader2006-12-16 01:29:26 +0000
commit4bc5d7668ef47295810f28a14d67b4a9e12a341f (patch)
tree2e22bd79984f0772c43e294babc07c1508ce95ce /src
parentb44bfd5e9bf3a0e853bc0d4788e4c89a01a70d6a (diff)
parentc3342e8eb3eaf4560210fd030383a940640648f2 (diff)
downloademacs-4bc5d7668ef47295810f28a14d67b4a9e12a341f.tar.gz
emacs-4bc5d7668ef47295810f28a14d67b4a9e12a341f.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 545-562) - Update from CVS - Update from erc--emacs--22 - Merge from gnus--rel--5.10 - erc-iswitchb: Temporarily enable iswitchb mode * gnus--rel--5.10 (patch 172-176) - Merge from emacs--devo--0 - Update from CVS - Update from CVS: lisp/legacy-gnus-agent.el: Add Copyright notice. Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-156
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog141
-rw-r--r--src/abbrev.c2
-rw-r--r--src/buffer.c14
-rw-r--r--src/category.c3
-rw-r--r--src/category.h3
-rw-r--r--src/ccl.c3
-rw-r--r--src/ccl.h3
-rw-r--r--src/charset.c3
-rw-r--r--src/charset.h3
-rw-r--r--src/coding.c3
-rw-r--r--src/coding.h3
-rw-r--r--src/composite.c2
-rw-r--r--src/composite.h2
-rw-r--r--src/emacs.c27
-rw-r--r--src/fontset.c3
-rw-r--r--src/fontset.h3
-rw-r--r--src/frame.h2
-rw-r--r--src/keyboard.c180
-rw-r--r--src/keyboard.h1
-rw-r--r--src/keymap.c29
-rw-r--r--src/lread.c6
-rw-r--r--src/m/amdx86-64.h7
-rw-r--r--src/mac.c25
-rw-r--r--src/macfns.c27
-rw-r--r--src/macselect.c3
-rw-r--r--src/macterm.c226
-rw-r--r--src/macterm.h1
-rw-r--r--src/marker.c2
-rw-r--r--src/minibuf.c8
-rw-r--r--src/msdos.c2
-rw-r--r--src/msdos.h2
-rw-r--r--src/process.c8
-rw-r--r--src/syntax.c4
-rw-r--r--src/systime.h8
-rw-r--r--src/w32fns.c10
-rw-r--r--src/w32term.c8
-rw-r--r--src/xdisp.c15
-rw-r--r--src/xterm.c48
38 files changed, 637 insertions, 203 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index de7417da7ab..27411da33cb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,144 @@
12006-12-15 Eli Zaretskii <eliz@gnu.org>
2
3 * emacs.c (USAGE3): Clarify documentation of --color.
4
52006-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6
7 * mac.c (wakeup_from_rne_enabled_p) [TARGET_API_MAC_CARBON]: New
8 variable.
9 (ENABLE_WAKEUP_FROM_RNE, DISABLE_WAKEUP_FROM_RNE): New macros.
10 [!MAC_OSX] (select): Use them.
11 [MAC_OSX] (select_and_poll_event, sys_select): Likewise.
12 (mac_wakeup_from_rne) [TARGET_API_MAC_CARBON]: New function.
13
14 * macfns.c (mac_atsu_font_face_attributes) [USE_ATSUI]: Add extern.
15 (Fmac_atsu_font_face_attributes) [USE_ATSUI]: New function.
16 (syms_of_macfns) [USE_ATSUI]: Defsubr it.
17
18 * macselect.c [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Use
19 mac_wakeup_from_rne instead of mac_post_mouse_moved_event.
20
21 * macterm.c (mac_query_char_extents) [USE_ATSUI]: Don't call
22 ATSUGetGlyphBounds if not necessary.
23 (Vmac_atsu_font_table) [USE_ATSUI]: Remove Variable.
24 (syms_of_macterm) [USE_ATSUI]: Don't defvar it.
25 (fm_get_style_from_font, atsu_find_font_from_family_name)
26 (atsu_find_font_family_name, mac_atsu_font_face_attributes)
27 [USE_ATSUI]: New functions.
28 (init_font_name_table) [USE_ATSUI]: Use atsu_find_font_family_name.
29 (mac_load_query_font) [USE_ATSUI]: Use atsu_find_font_from_family_name.
30 Don't get metrics for Latin-1 right half characters.
31 (mac_load_query_font): Don't load font if space width is not positive.
32 [TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event): Use
33 mac_wakeup_from_rne instead of mac_post_mouse_moved_event.
34 (XTread_socket): Call SelectWindow when unfocused frame is clicked.
35
36 * macterm.h (mac_wakeup_from_rne) [TARGET_API_MAC_CARBON]: Add extern.
37
382006-12-15 Kim F. Storm <storm@cua.dk>
39
40 * keyboard.c (ignore_mouse_drag_p): New global var.
41 (some_mouse_moved): Return 0 if it is non-zero.
42 (make_lispy_event): Generate click event on mouse up if
43 ignore_mouse_drag_p is non-zero, even if mouse moved.
44 Clear ignore_mouse_drag_p on mouse down/up.
45
46 * xdisp.c (redisplay_window): Set ignore_mouse_drag_p if tool-bar
47 is resized to avoid generating a mouse drag event.
48
492006-12-14 Juanma Barranquero <lekktu@gmail.com>
50
51 * w32fns.c (w32_wnd_proc): Force non-tooltip frames to respect the
52 minimum tracking size. Remove non-working old hack to do the same.
53
542006-12-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
55
56 * emacs.c (handle_user_signal): Move function to keyboard.c.
57 (main): Use add_user_signal for SIGUSR1 and SIGUSR2.
58
59 * keyboard.c (make_lispy_event): Use find_user_signal_name.
60 (read_avail_input): Store pending user signal events.
61 (struct user_signal_info): New struct.
62 (user_signals): New variable.
63 (add_user_signal, store_user_signal_events)
64 (find_user_signal_name): New functions.
65 (handle_user_signal): Move function from emacs.c. Don't store
66 USER_SIGNAL_EVENT here, but increment number of pending signals.
67
68 * keyboard.h (add_user_signals): Add extern.
69
702006-12-11 Juanma Barranquero <lekktu@gmail.com>
71
72 * buffer.c (syms_of_buffer) <cursor-in-non-selected-windows>:
73 <default-scroll-up-aggressively, default-scroll-down-aggressively>:
74 <line-spacing, left-margin>: Doc fixes.
75
76 * xdisp.c (syms_of_xdisp) <mode-line-inverse-video>: Doc fix.
77
782006-12-10 Kim F. Storm <storm@cua.dk>
79
80 * xdisp.c (show_mouse_face): Never use text cursor in tool-bar.
81
822006-12-10 Juanma Barranquero <lekktu@gmail.com>
83
84 * abbrev.c (syms_of_abbrev) <last-abbrev-text>:
85 * buffer.c (syms_of_buffer) <default-major-mode>:
86 * keymap.c (Flookup_key):
87 * lread.c (Feval_buffer, Feval_region):
88 * macterm.c (syms_of_macterm) <x-use-underline-position-properties>:
89 <x-underline-at-descent-line, mac-emulate-three-button-mouse>:
90 * marker.c (Fmarker_insertion_type):
91 * minibuf.c (syms_of_minibuf) <minibuffer-completion-table>:
92 * msdos.c (syms_of_msdos) <delete-exited-processes>:
93 * w32term.c (syms_of_w32term) <x-use-underline-position-properties>:
94 <x-underline-at-descent-line>:
95 * xdisp.c (format-mode-line):
96 * xterm.c (syms_of_xterm) <x-use-underline-position-properties>:
97 <x-underline-at-descent-line>: Doc fixes.
98
992006-12-10 Andreas Schwab <schwab@suse.de>
100
101 * systime.h (EMACS_GET_TIME): Remove check for
102 HAVE_STRUCT_TIMEZONE which is never defined.
103
1042006-12-10 Alan Mackenzie <acm@muc.de>
105
106 * syntax.c (Fpartial_parse_sexp): Correct Docco: Elt 8 of the
107 result is now neither the last elt nor optional for OLDSTATE.
108
1092006-12-09 Eli Zaretskii <eliz@gnu.org>
110
111 * process.c (Fsignal_process): Doc fix. Use XFLOAT_DATA to
112 extract the process ID from a Lisp float.
113
1142006-12-09 Chong Yidong <cyd@stupidchicken.com>
115
116 * xterm.c (XTframe_raise_lower): Comment out _NET_ACTIVE_WINDOW code.
117
1182006-12-08 Eli Zaretskii <eliz@gnu.org>
119
120 * frame.h (PIX_TYPE): Redefine as `unsigned long', for 64-bit
121 platforms where long is 64-bit.
122
123 * msdos.h (PIX_TYPE): Redefine as `unsigned long'.
124
1252006-12-08 NAKAJI Hiroyuki <nakaji@jp.freebsd.org> (tiny change)
126
127 * m/amdx86-64.h: Add support for Solaris 10 on x86-64.
128
1292006-12-08 Kenichi Handa <handa@m17n.org>
130
131 * xterm.c (x_query_font): Use xstricmp instead off strcasecmp.
132
1332006-12-08 Juanma Barranquero <lekktu@gmail.com>
134
135 * emacs.c (syms_of_emacs) <system-type>: Doc fix.
136
1372006-12-07 Kim F. Storm <storm@cua.dk>
138
139 * process.c (parse_signal): Use xstricmp instead of strcasecmp.
140 (Fsignal_process): Don't use strncasecmp.
141
12006-12-05 Glenn Morris <rgm@gnu.org> 1422006-12-05 Glenn Morris <rgm@gnu.org>
2 143
3 * abbrev.c (Qforce): New Lisp_Object. 144 * abbrev.c (Qforce): New Lisp_Object.
diff --git a/src/abbrev.c b/src/abbrev.c
index 5e8c8c98862..2d95b881bc5 100644
--- a/src/abbrev.c
+++ b/src/abbrev.c
@@ -685,7 +685,7 @@ for any particular abbrev defined in both. */);
685 685
686 DEFVAR_LISP ("last-abbrev-text", &Vlast_abbrev_text, 686 DEFVAR_LISP ("last-abbrev-text", &Vlast_abbrev_text,
687 doc: /* The exact text of the last abbrev expanded. 687 doc: /* The exact text of the last abbrev expanded.
688nil if the abbrev has already been unexpanded. */); 688A value of nil means the abbrev has already been unexpanded. */);
689 689
690 DEFVAR_INT ("last-abbrev-location", &last_abbrev_point, 690 DEFVAR_INT ("last-abbrev-location", &last_abbrev_point,
691 doc: /* The location of the start of the last abbrev expanded. */); 691 doc: /* The location of the start of the last abbrev expanded. */);
diff --git a/src/buffer.c b/src/buffer.c
index 95f900aaf46..e9c3c47a959 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5447,13 +5447,13 @@ This is the same as (default-value 'fringe-cursor-alist'). */);
5447 &buffer_defaults.scroll_up_aggressively, 5447 &buffer_defaults.scroll_up_aggressively,
5448 doc: /* Default value of `scroll-up-aggressively'. 5448 doc: /* Default value of `scroll-up-aggressively'.
5449This value applies in buffers that don't have their own local values. 5449This value applies in buffers that don't have their own local values.
5450This variable is an alias for (default-value 'scroll-up-aggressively). */); 5450This is the same as (default-value 'scroll-up-aggressively). */);
5451 5451
5452 DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively", 5452 DEFVAR_LISP_NOPRO ("default-scroll-down-aggressively",
5453 &buffer_defaults.scroll_down_aggressively, 5453 &buffer_defaults.scroll_down_aggressively,
5454 doc: /* Default value of `scroll-down-aggressively'. 5454 doc: /* Default value of `scroll-down-aggressively'.
5455This value applies in buffers that don't have their own local values. 5455This value applies in buffers that don't have their own local values.
5456This variable is an alias for (default-value 'scroll-down-aggressively). */); 5456This is the same as (default-value 'scroll-down-aggressively). */);
5457 5457
5458 DEFVAR_PER_BUFFER ("header-line-format", 5458 DEFVAR_PER_BUFFER ("header-line-format",
5459 &current_buffer->header_line_format, 5459 &current_buffer->header_line_format,
@@ -5516,8 +5516,8 @@ Decimal digits after the % specify field width to which to pad. */);
5516 5516
5517 DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode, 5517 DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode,
5518 doc: /* *Major mode for new buffers. Defaults to `fundamental-mode'. 5518 doc: /* *Major mode for new buffers. Defaults to `fundamental-mode'.
5519nil here means use current buffer's major mode, provided it is not 5519A value of nil means use current buffer's major mode,
5520marked as "special". 5520provided it is not marked as "special".
5521 5521
5522When a mode is used by default, `find-file' switches to it 5522When a mode is used by default, `find-file' switches to it
5523before it reads the contents into the buffer and before 5523before it reads the contents into the buffer and before
@@ -5547,7 +5547,7 @@ Interactively, you can set the buffer local value using \\[set-fill-column]. */
5547 5547
5548 DEFVAR_PER_BUFFER ("left-margin", &current_buffer->left_margin, 5548 DEFVAR_PER_BUFFER ("left-margin", &current_buffer->left_margin,
5549 make_number (Lisp_Int), 5549 make_number (Lisp_Int),
5550 doc: /* *Column for the default indent-line-function to indent to. 5550 doc: /* *Column for the default `indent-line-function' to indent to.
5551Linefeed indents to this column in Fundamental mode. */); 5551Linefeed indents to this column in Fundamental mode. */);
5552 5552
5553 DEFVAR_PER_BUFFER ("tab-width", &current_buffer->tab_width, 5553 DEFVAR_PER_BUFFER ("tab-width", &current_buffer->tab_width,
@@ -6052,12 +6052,12 @@ this variable has no effect; the cursor appears as a hollow box. */);
6052 doc: /* Additional space to put between lines when displaying a buffer. 6052 doc: /* Additional space to put between lines when displaying a buffer.
6053The space is measured in pixels, and put below lines on window systems. 6053The space is measured in pixels, and put below lines on window systems.
6054If value is a floating point number, it specifies the spacing relative 6054If value is a floating point number, it specifies the spacing relative
6055to the default frame line height. nil means add no extra space. */); 6055to the default frame line height. A value of nil means add no extra space. */);
6056 6056
6057 DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", 6057 DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows",
6058 &current_buffer->cursor_in_non_selected_windows, Qnil, 6058 &current_buffer->cursor_in_non_selected_windows, Qnil,
6059 doc: /* *Cursor type to display in non-selected windows. 6059 doc: /* *Cursor type to display in non-selected windows.
6060t means to use hollow box cursor. See `cursor-type' for other values. */); 6060The value t means to use hollow box cursor. See `cursor-type' for other values. */);
6061 6061
6062 DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, 6062 DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions,
6063 doc: /* List of functions called with no args to query before killing a buffer. */); 6063 doc: /* List of functions called with no args to query before killing a buffer. */);
diff --git a/src/category.c b/src/category.c
index cb6385fdb25..4d19d4a6ccd 100644
--- a/src/category.c
+++ b/src/category.c
@@ -1,6 +1,7 @@
1/* GNU Emacs routines to deal with category tables. 1/* GNU Emacs routines to deal with category tables.
2 Copyright (C) 1998, 2001, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 1998, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
3 Copyright (C) 1995, 1997, 1998, 1999 3 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006
4 National Institute of Advanced Industrial Science and Technology (AIST) 5 National Institute of Advanced Industrial Science and Technology (AIST)
5 Registration Number H14PRO021 6 Registration Number H14PRO021
6 Copyright (C) 2003 7 Copyright (C) 2003
diff --git a/src/category.h b/src/category.h
index 4799b7a5e3d..86257635226 100644
--- a/src/category.h
+++ b/src/category.h
@@ -1,5 +1,6 @@
1/* Declarations having to do with Emacs category tables. 1/* Declarations having to do with Emacs category tables.
2 Copyright (C) 1995, 1998, 1999 2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006
3 National Institute of Advanced Industrial Science and Technology (AIST) 4 National Institute of Advanced Industrial Science and Technology (AIST)
4 Registration Number H14PRO021 5 Registration Number H14PRO021
5 Copyright (C) 2003 6 Copyright (C) 2003
diff --git a/src/ccl.c b/src/ccl.c
index 1ff97229466..017c9ab4feb 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -1,7 +1,8 @@
1/* CCL (Code Conversion Language) interpreter. 1/* CCL (Code Conversion Language) interpreter.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1997, 1998, 2003, 2004, 2005 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006
5 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 7 Registration Number H14PRO021
7 Copyright (C) 2003 8 Copyright (C) 2003
diff --git a/src/ccl.h b/src/ccl.h
index 96417e79fa5..01d92b621eb 100644
--- a/src/ccl.h
+++ b/src/ccl.h
@@ -1,5 +1,6 @@
1/* Header for CCL (Code Conversion Language) interpreter. 1/* Header for CCL (Code Conversion Language) interpreter.
2 Copyright (C) 1995, 1998, 2000 2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 2005, 2006
3 National Institute of Advanced Industrial Science and Technology (AIST) 4 National Institute of Advanced Industrial Science and Technology (AIST)
4 Registration Number H14PRO021 5 Registration Number H14PRO021
5 Copyright (C) 2003 6 Copyright (C) 2003
diff --git a/src/charset.c b/src/charset.c
index 2228a24f698..9fb7f641705 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1,7 +1,8 @@
1/* Basic character set support. 1/* Basic character set support.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006
5 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 7 Registration Number H14PRO021
7 Copyright (C) 2003, 2004 8 Copyright (C) 2003, 2004
diff --git a/src/charset.h b/src/charset.h
index 25ccaf9d324..e7aaf9d6194 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -1,7 +1,8 @@
1/* Header for charset handler. 1/* Header for charset handler.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1997, 1998, 2003 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006
5 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 7 Registration Number H14PRO021
7 Copyright (C) 2003 8 Copyright (C) 2003
diff --git a/src/coding.c b/src/coding.c
index 28ab86c43fc..50c63b4beb8 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1,7 +1,8 @@
1/* Coding system handler (conversion, detection, etc). 1/* Coding system handler (conversion, detection, etc).
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1997, 1998, 2002, 2003, 2004, 2005 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006
5 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 7 Registration Number H14PRO021
7 Copyright (C) 2003 8 Copyright (C) 2003
diff --git a/src/coding.h b/src/coding.h
index 93375d2c2eb..0f8d2b0ed7b 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -1,7 +1,8 @@
1/* Header for coding system handler. 1/* Header for coding system handler.
2 Copyright (C) 2002, 2003, 2004, 2005, 2 Copyright (C) 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1997, 1998, 2000 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006
5 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 7 Registration Number H14PRO021
7 Copyright (C) 2003 8 Copyright (C) 2003
diff --git a/src/composite.c b/src/composite.c
index ea6b3708f12..1ccd3af2515 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1,7 +1,7 @@
1/* Composite sequence support. 1/* Composite sequence support.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006 Free Software Foundation, Inc.
4 Copyright (C) 1999 4 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
5 National Institute of Advanced Industrial Science and Technology (AIST) 5 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 6 Registration Number H14PRO021
7 Copyright (C) 2003, 2006 7 Copyright (C) 2003, 2006
diff --git a/src/composite.h b/src/composite.h
index 08463afd899..6e600e7a29b 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -1,7 +1,7 @@
1/* Header for composite sequence handler. 1/* Header for composite sequence handler.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 2001, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006 Free Software Foundation, Inc.
4 Copyright (C) 1997 4 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
5 National Institute of Advanced Industrial Science and Technology (AIST) 5 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 6 Registration Number H14PRO021
7 Copyright (C) 2003, 2006 7 Copyright (C) 2003, 2006
diff --git a/src/emacs.c b/src/emacs.c
index 935a12463dc..6601336edd5 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -303,7 +303,7 @@ Display options:\n\
303 used for debugging Emacs\n\ 303 used for debugging Emacs\n\
304--border-color, -bd COLOR main border color\n\ 304--border-color, -bd COLOR main border color\n\
305--border-width, -bw WIDTH width of main border\n\ 305--border-width, -bw WIDTH width of main border\n\
306--color, --color=MODE color mode for character terminals;\n\ 306--color, --color=MODE override color mode for character terminals;\n\
307 MODE defaults to `auto', and can also\n\ 307 MODE defaults to `auto', and can also\n\
308 be `never', `auto', `always',\n\ 308 be `never', `auto', `always',\n\
309 or a mode name like `ansi8'\n\ 309 or a mode name like `ansi8'\n\
@@ -361,24 +361,6 @@ pthread_t main_thread;
361#endif 361#endif
362 362
363 363
364#if defined (SIGUSR1) || defined (SIGUSR2)
365SIGTYPE
366handle_user_signal (sig)
367 int sig;
368{
369 struct input_event buf;
370
371 SIGNAL_THREAD_CHECK (sig);
372 bzero (&buf, sizeof buf);
373 buf.kind = USER_SIGNAL_EVENT;
374 buf.frame_or_window = selected_frame;
375
376 kbd_buffer_store_event (&buf);
377 buf.code = sig;
378 kbd_buffer_store_event (&buf);
379}
380#endif
381
382/* Handle bus errors, invalid instruction, etc. */ 364/* Handle bus errors, invalid instruction, etc. */
383SIGTYPE 365SIGTYPE
384fatal_error_signal (sig) 366fatal_error_signal (sig)
@@ -1214,10 +1196,10 @@ main (argc, argv
1214 signal (SIGILL, fatal_error_signal); 1196 signal (SIGILL, fatal_error_signal);
1215 signal (SIGTRAP, fatal_error_signal); 1197 signal (SIGTRAP, fatal_error_signal);
1216#ifdef SIGUSR1 1198#ifdef SIGUSR1
1217 signal (SIGUSR1, handle_user_signal); 1199 add_user_signal (SIGUSR1, "usr1");
1218#endif 1200#endif
1219#ifdef SIGUSR2 1201#ifdef SIGUSR2
1220 signal (SIGUSR2, handle_user_signal); 1202 add_user_signal (SIGUSR2, "usr2");
1221#endif 1203#endif
1222#ifdef SIGABRT 1204#ifdef SIGABRT
1223 signal (SIGABRT, fatal_error_signal); 1205 signal (SIGABRT, fatal_error_signal);
@@ -2478,7 +2460,8 @@ Special values:
2478 `ms-dos' compiled as an MS-DOS application. 2460 `ms-dos' compiled as an MS-DOS application.
2479 `windows-nt' compiled as a native W32 application. 2461 `windows-nt' compiled as a native W32 application.
2480 `cygwin' compiled using the Cygwin library. 2462 `cygwin' compiled using the Cygwin library.
2481 `vax-vms' or `axp-vms': compiled for a (Open)VMS system. 2463 `vax-vms' or
2464 `axp-vms' compiled for a (Open)VMS system.
2482Anything else indicates some sort of Unix system. */); 2465Anything else indicates some sort of Unix system. */);
2483 Vsystem_type = intern (SYSTEM_TYPE); 2466 Vsystem_type = intern (SYSTEM_TYPE);
2484 2467
diff --git a/src/fontset.c b/src/fontset.c
index a52082e2ff4..5a50012fef4 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1,6 +1,7 @@
1/* Fontset handler. 1/* Fontset handler.
2 Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
3 Copyright (C) 1995, 1997, 1998, 2000, 2003, 2004, 2005 3 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006
4 National Institute of Advanced Industrial Science and Technology (AIST) 5 National Institute of Advanced Industrial Science and Technology (AIST)
5 Registration Number H14PRO021 6 Registration Number H14PRO021
6 Copyright (C) 2003, 2006 7 Copyright (C) 2003, 2006
diff --git a/src/fontset.h b/src/fontset.h
index cf09dde73f2..b86c26784c7 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -1,7 +1,8 @@
1/* Header for fontset handler. 1/* Header for fontset handler.
2 Copyright (C) 1998, 2002, 2003, 2004, 2005, 2 Copyright (C) 1998, 2002, 2003, 2004, 2005,
3 2006 Free Software Foundation, Inc. 3 2006 Free Software Foundation, Inc.
4 Copyright (C) 1995, 1997, 2000 4 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 2005, 2006
5 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H14PRO021 7 Registration Number H14PRO021
7 Copyright (C) 2003, 2006 8 Copyright (C) 2003, 2006
diff --git a/src/frame.h b/src/frame.h
index 75770eb4c36..3148e583e89 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -72,7 +72,7 @@ enum text_cursor_kinds
72 72
73#if !defined(HAVE_X_WINDOWS) 73#if !defined(HAVE_X_WINDOWS)
74 74
75#define PIX_TYPE int 75#define PIX_TYPE unsigned long
76 76
77/* A (mostly empty) x_output structure definition for building Emacs 77/* A (mostly empty) x_output structure definition for building Emacs
78 on Unix and GNU/Linux without X support. */ 78 on Unix and GNU/Linux without X support. */
diff --git a/src/keyboard.c b/src/keyboard.c
index 3a9f6f415db..ef8107b2ce3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -699,6 +699,9 @@ static SIGTYPE interrupt_signal P_ ((int signalnum));
699static void timer_start_idle P_ ((void)); 699static void timer_start_idle P_ ((void));
700static void timer_stop_idle P_ ((void)); 700static void timer_stop_idle P_ ((void));
701static void timer_resume_idle P_ ((void)); 701static void timer_resume_idle P_ ((void));
702static SIGTYPE handle_user_signal P_ ((int));
703static char *find_user_signal_name P_ ((int));
704static int store_user_signal_events P_ ((void));
702 705
703/* Nonzero means don't try to suspend even if the operating system seems 706/* Nonzero means don't try to suspend even if the operating system seems
704 to support it. */ 707 to support it. */
@@ -1435,13 +1438,25 @@ usage: (track-mouse BODY ...) */)
1435} 1438}
1436 1439
1437/* If mouse has moved on some frame, return one of those frames. 1440/* If mouse has moved on some frame, return one of those frames.
1438 Return 0 otherwise. */ 1441
1442 Return 0 otherwise.
1443
1444 If ignore_mouse_drag_p is non-zero, ignore (implicit) mouse movement
1445 after resizing the tool-bar window. */
1446
1447int ignore_mouse_drag_p;
1439 1448
1440static FRAME_PTR 1449static FRAME_PTR
1441some_mouse_moved () 1450some_mouse_moved ()
1442{ 1451{
1443 Lisp_Object tail, frame; 1452 Lisp_Object tail, frame;
1444 1453
1454 if (ignore_mouse_drag_p)
1455 {
1456 //ignore_mouse_drag_p = 0;
1457 return 0;
1458 }
1459
1445 FOR_EACH_FRAME (tail, frame) 1460 FOR_EACH_FRAME (tail, frame)
1446 { 1461 {
1447 if (XFRAME (frame)->mouse_moved) 1462 if (XFRAME (frame)->mouse_moved)
@@ -5589,6 +5604,7 @@ make_lispy_event (event)
5589 double_click_count = 1; 5604 double_click_count = 1;
5590 button_down_time = event->timestamp; 5605 button_down_time = event->timestamp;
5591 *start_pos_ptr = Fcopy_alist (position); 5606 *start_pos_ptr = Fcopy_alist (position);
5607 ignore_mouse_drag_p = 0;
5592 } 5608 }
5593 5609
5594 /* Now we're releasing a button - check the co-ordinates to 5610 /* Now we're releasing a button - check the co-ordinates to
@@ -5624,8 +5640,13 @@ make_lispy_event (event)
5624 ydiff = XINT (event->y) - XINT (XCDR (down)); 5640 ydiff = XINT (event->y) - XINT (XCDR (down));
5625 } 5641 }
5626 5642
5627 if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz 5643 if (ignore_mouse_drag_p)
5628 && ydiff < double_click_fuzz && ydiff > - double_click_fuzz 5644 {
5645 event->modifiers |= click_modifier;
5646 ignore_mouse_drag_p = 0;
5647 }
5648 else if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz
5649 && ydiff < double_click_fuzz && ydiff > - double_click_fuzz
5629 /* Maybe the mouse has moved a lot, caused scrolling, and 5650 /* Maybe the mouse has moved a lot, caused scrolling, and
5630 eventually ended up at the same screen position (but 5651 eventually ended up at the same screen position (but
5631 not buffer position) in which case it is a drag, not 5652 not buffer position) in which case it is a drag, not
@@ -5948,20 +5969,16 @@ make_lispy_event (event)
5948 5969
5949 case USER_SIGNAL_EVENT: 5970 case USER_SIGNAL_EVENT:
5950 /* A user signal. */ 5971 /* A user signal. */
5951 switch (event->code) 5972 if (event->code == 0)
5973 return Qsignal;
5974 else
5952 { 5975 {
5953 case 0: 5976 char *name = find_user_signal_name (event->code);
5954 return Qsignal; 5977
5955#ifdef SIGUSR1 5978 if (name)
5956 case SIGUSR1: 5979 return intern (name);
5957 return intern ("usr1"); 5980 else
5958#endif 5981 return make_number (event->code);
5959#ifdef SIGUSR2
5960 case SIGUSR2:
5961 return intern ("usr2");
5962#endif
5963 default:
5964 return make_number (event->code);
5965 } 5982 }
5966 5983
5967 case SAVE_SESSION_EVENT: 5984 case SAVE_SESSION_EVENT:
@@ -6799,6 +6816,10 @@ read_avail_input (expected)
6799 register int i; 6816 register int i;
6800 int nread = 0; 6817 int nread = 0;
6801 6818
6819 /* Store pending user signal events, if any. */
6820 if (store_user_signal_events ())
6821 expected = 0;
6822
6802 if (read_socket_hook) 6823 if (read_socket_hook)
6803 { 6824 {
6804 int nr; 6825 int nr;
@@ -7022,6 +7043,133 @@ reinvoke_input_signal ()
7022 7043
7023 7044
7024 7045
7046/* User signal events. */
7047
7048struct user_signal_info
7049{
7050 /* Signal number. */
7051 int sig;
7052
7053 /* Name of the signal. */
7054 char *name;
7055
7056 /* Number of pending signals. */
7057 int npending;
7058
7059 struct user_signal_info *next;
7060};
7061
7062/* List of user signals. */
7063static struct user_signal_info *user_signals = NULL;
7064
7065void
7066add_user_signal (sig, name)
7067 int sig;
7068 const char *name;
7069{
7070 struct user_signal_info *p;
7071
7072 for (p = user_signals; p; p = p->next)
7073 if (p->sig == sig)
7074 /* Already added. */
7075 return;
7076
7077 p = xmalloc (sizeof (struct user_signal_info));
7078 p->sig = sig;
7079 p->name = xstrdup (name);
7080 p->npending = 0;
7081 p->next = user_signals;
7082 user_signals = p;
7083
7084 signal (sig, handle_user_signal);
7085}
7086
7087static SIGTYPE
7088handle_user_signal (sig)
7089 int sig;
7090{
7091 int old_errno = errno;
7092 struct user_signal_info *p;
7093
7094#if defined (USG) && !defined (POSIX_SIGNALS)
7095 /* USG systems forget handlers when they are used;
7096 must reestablish each time */
7097 signal (sig, handle_user_signal);
7098#endif
7099
7100 SIGNAL_THREAD_CHECK (sig);
7101
7102 for (p = user_signals; p; p = p->next)
7103 if (p->sig == sig)
7104 {
7105 p->npending++;
7106#ifdef SIGIO
7107 if (interrupt_input)
7108 kill (getpid (), SIGIO);
7109 else
7110#endif
7111 {
7112 /* Tell wait_reading_process_output that it needs to wake
7113 up and look around. */
7114 if (input_available_clear_time)
7115 EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0);
7116 }
7117 break;
7118 }
7119
7120 errno = old_errno;
7121}
7122
7123static char *
7124find_user_signal_name (sig)
7125 int sig;
7126{
7127 struct user_signal_info *p;
7128
7129 for (p = user_signals; p; p = p->next)
7130 if (p->sig == sig)
7131 return p->name;
7132
7133 return NULL;
7134}
7135
7136static int
7137store_user_signal_events ()
7138{
7139 struct user_signal_info *p;
7140 struct input_event buf;
7141 int nstored = 0;
7142
7143 for (p = user_signals; p; p = p->next)
7144 if (p->npending > 0)
7145 {
7146 SIGMASKTYPE mask;
7147
7148 if (nstored == 0)
7149 {
7150 bzero (&buf, sizeof buf);
7151 buf.kind = USER_SIGNAL_EVENT;
7152 buf.frame_or_window = selected_frame;
7153 }
7154 nstored += p->npending;
7155
7156 mask = sigblock (sigmask (p->sig));
7157 do
7158 {
7159 buf.code = 0;
7160 kbd_buffer_store_event (&buf);
7161 buf.code = p->sig;
7162 kbd_buffer_store_event (&buf);
7163 p->npending--;
7164 }
7165 while (p->npending > 0);
7166 sigsetmask (mask);
7167 }
7168
7169 return nstored;
7170}
7171
7172
7025static void menu_bar_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, void*)); 7173static void menu_bar_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, void*));
7026static Lisp_Object menu_bar_one_keymap_changed_items; 7174static Lisp_Object menu_bar_one_keymap_changed_items;
7027 7175
diff --git a/src/keyboard.h b/src/keyboard.h
index 96ac7d2e856..984ecccc0a4 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -344,6 +344,7 @@ extern void gen_help_event P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
344extern void kbd_buffer_store_help_event P_ ((Lisp_Object, Lisp_Object)); 344extern void kbd_buffer_store_help_event P_ ((Lisp_Object, Lisp_Object));
345extern Lisp_Object menu_item_eval_property P_ ((Lisp_Object)); 345extern Lisp_Object menu_item_eval_property P_ ((Lisp_Object));
346extern int kbd_buffer_events_waiting P_ ((int)); 346extern int kbd_buffer_events_waiting P_ ((int));
347extern void add_user_signals P_ ((int, const char *));
347 348
348/* arch-tag: 769cbade-1ba9-4950-b886-db265b061aa3 349/* arch-tag: 769cbade-1ba9-4950-b886-db265b061aa3
349 (do not change this comment) */ 350 (do not change this comment) */
diff --git a/src/keymap.c b/src/keymap.c
index f67cc109e87..176b6760e36 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1280,7 +1280,8 @@ buffer position instead of point are used. */)
1280 1280
1281DEFUN ("lookup-key", Flookup_key, Slookup_key, 2, 3, 0, 1281DEFUN ("lookup-key", Flookup_key, Slookup_key, 2, 3, 0,
1282 doc: /* In keymap KEYMAP, look up key sequence KEY. Return the definition. 1282 doc: /* In keymap KEYMAP, look up key sequence KEY. Return the definition.
1283nil means undefined. See doc of `define-key' for kinds of definitions. 1283A value of nil means undefined. See doc of `define-key'
1284for kinds of definitions.
1284 1285
1285A number as value means KEY is "too long"; 1286A number as value means KEY is "too long";
1286that is, characters or symbols in it except for the last one 1287that is, characters or symbols in it except for the last one
@@ -1655,13 +1656,13 @@ specified buffer position instead of point are used.
1655 are read using the keymaps of the buffer clicked on, not 1656 are read using the keymaps of the buffer clicked on, not
1656 the current buffer. So we may have to switch the buffer 1657 the current buffer. So we may have to switch the buffer
1657 here. */ 1658 here. */
1658 1659
1659 if (CONSP (position)) 1660 if (CONSP (position))
1660 { 1661 {
1661 Lisp_Object window; 1662 Lisp_Object window;
1662 1663
1663 window = POSN_WINDOW (position); 1664 window = POSN_WINDOW (position);
1664 1665
1665 if (WINDOWP (window) 1666 if (WINDOWP (window)
1666 && BUFFERP (XWINDOW (window)->buffer) 1667 && BUFFERP (XWINDOW (window)->buffer)
1667 && XBUFFER (XWINDOW (window)->buffer) != current_buffer) 1668 && XBUFFER (XWINDOW (window)->buffer) != current_buffer)
@@ -1673,13 +1674,13 @@ specified buffer position instead of point are used.
1673 would not be a problem here, but it is easier to keep 1674 would not be a problem here, but it is easier to keep
1674 things the same. 1675 things the same.
1675 */ 1676 */
1676 1677
1677 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); 1678 record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
1678 1679
1679 set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); 1680 set_buffer_internal (XBUFFER (XWINDOW (window)->buffer));
1680 } 1681 }
1681 } 1682 }
1682 1683
1683 if (! NILP (current_kboard->Voverriding_terminal_local_map)) 1684 if (! NILP (current_kboard->Voverriding_terminal_local_map))
1684 { 1685 {
1685 value = Flookup_key (current_kboard->Voverriding_terminal_local_map, 1686 value = Flookup_key (current_kboard->Voverriding_terminal_local_map,
@@ -1702,8 +1703,8 @@ specified buffer position instead of point are used.
1702 : MARKERP (position) ? marker_position (position) 1703 : MARKERP (position) ? marker_position (position)
1703 : PT; 1704 : PT;
1704 1705
1705 local_map = get_local_map (pt, current_buffer, Qlocal_map); 1706 local_map = get_local_map (pt, current_buffer, Qlocal_map);
1706 keymap = get_local_map (pt, current_buffer, Qkeymap); 1707 keymap = get_local_map (pt, current_buffer, Qkeymap);
1707 1708
1708 if (CONSP (position)) 1709 if (CONSP (position))
1709 { 1710 {
@@ -1711,7 +1712,7 @@ specified buffer position instead of point are used.
1711 1712
1712 /* For a mouse click, get the local text-property keymap 1713 /* For a mouse click, get the local text-property keymap
1713 of the place clicked on, rather than point. */ 1714 of the place clicked on, rather than point. */
1714 1715
1715 if (POSN_INBUFFER_P (position)) 1716 if (POSN_INBUFFER_P (position))
1716 { 1717 {
1717 Lisp_Object pos; 1718 Lisp_Object pos;
@@ -1722,7 +1723,7 @@ specified buffer position instead of point are used.
1722 { 1723 {
1723 local_map = get_local_map (XINT (pos), 1724 local_map = get_local_map (XINT (pos),
1724 current_buffer, Qlocal_map); 1725 current_buffer, Qlocal_map);
1725 1726
1726 keymap = get_local_map (XINT (pos), 1727 keymap = get_local_map (XINT (pos),
1727 current_buffer, Qkeymap); 1728 current_buffer, Qkeymap);
1728 } 1729 }
@@ -1733,12 +1734,12 @@ specified buffer position instead of point are used.
1733 string displayed via the `display' property, 1734 string displayed via the `display' property,
1734 consider `local-map' and `keymap' properties of 1735 consider `local-map' and `keymap' properties of
1735 that string. */ 1736 that string. */
1736 1737
1737 if (string = POSN_STRING (position), 1738 if (string = POSN_STRING (position),
1738 (CONSP (string) && STRINGP (XCAR (string)))) 1739 (CONSP (string) && STRINGP (XCAR (string))))
1739 { 1740 {
1740 Lisp_Object pos, map; 1741 Lisp_Object pos, map;
1741 1742
1742 pos = XCDR (string); 1743 pos = XCDR (string);
1743 string = XCAR (string); 1744 string = XCAR (string);
1744 if (INTEGERP (pos) 1745 if (INTEGERP (pos)
@@ -1754,7 +1755,7 @@ specified buffer position instead of point are used.
1754 keymap = map; 1755 keymap = map;
1755 } 1756 }
1756 } 1757 }
1757 1758
1758 } 1759 }
1759 1760
1760 if (! NILP (keymap)) 1761 if (! NILP (keymap))
diff --git a/src/lread.c b/src/lread.c
index 79ccc8bd152..d6fab4ffc8c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -656,7 +656,7 @@ read_filtered_event (no_switch_frame, ascii_required, error_nonascii,
656 { 656 {
657 EMACS_TIME wait_time; 657 EMACS_TIME wait_time;
658 int sec, usec; 658 int sec, usec;
659 double duration = extract_float (seconds); 659 double duration = extract_float (seconds);
660 660
661 sec = (int) duration; 661 sec = (int) duration;
662 usec = (duration - sec) * 1000000; 662 usec = (duration - sec) * 1000000;
@@ -1743,7 +1743,7 @@ DEFUN ("eval-buffer", Feval_buffer, Seval_buffer, 0, 5, "",
1743Programs can pass two arguments, BUFFER and PRINTFLAG. 1743Programs can pass two arguments, BUFFER and PRINTFLAG.
1744BUFFER is the buffer to evaluate (nil means use current buffer). 1744BUFFER is the buffer to evaluate (nil means use current buffer).
1745PRINTFLAG controls printing of output: 1745PRINTFLAG controls printing of output:
1746nil means discard it; anything else is stream for print. 1746A value of nil means discard it; anything else is stream for print.
1747 1747
1748If the optional third argument FILENAME is non-nil, 1748If the optional third argument FILENAME is non-nil,
1749it specifies the file name to use for `load-history'. 1749it specifies the file name to use for `load-history'.
@@ -1792,7 +1792,7 @@ When called from programs, expects two arguments,
1792giving starting and ending indices in the current buffer 1792giving starting and ending indices in the current buffer
1793of the text to be executed. 1793of the text to be executed.
1794Programs can pass third argument PRINTFLAG which controls output: 1794Programs can pass third argument PRINTFLAG which controls output:
1795nil means discard it; anything else is stream for printing it. 1795A value of nil means discard it; anything else is stream for printing it.
1796Also the fourth argument READ-FUNCTION, if non-nil, is used 1796Also the fourth argument READ-FUNCTION, if non-nil, is used
1797instead of `read' to read each expression. It gets one argument 1797instead of `read' to read each expression. It gets one argument
1798which is the input stream for reading characters. 1798which is the input stream for reading characters.
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h
index 940ff70dbda..670360336a8 100644
--- a/src/m/amdx86-64.h
+++ b/src/m/amdx86-64.h
@@ -125,7 +125,12 @@ Boston, MA 02110-1301, USA. */
125#undef LIB_STANDARD 125#undef LIB_STANDARD
126#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o 126#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o
127 127
128#else /* !__OpenBSD__ && !__FreeBSD__ */ 128#elif defined(sun)
129
130#undef START_FILES
131#undef LIB_STANDARD
132
133#else /* !__OpenBSD__ && !__FreeBSD__ && !sun */
129 134
130#undef START_FILES 135#undef START_FILES
131#ifdef HAVE_X86_64_LIB64_DIR 136#ifdef HAVE_X86_64_LIB64_DIR
diff --git a/src/mac.c b/src/mac.c
index c4275caa741..e79bd775fda 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -79,6 +79,15 @@ static ComponentInstance as_scripting_component;
79/* The single script context used for all script executions. */ 79/* The single script context used for all script executions. */
80static OSAID as_script_context; 80static OSAID as_script_context;
81 81
82#if TARGET_API_MAC_CARBON
83static int wakeup_from_rne_enabled_p = 0;
84#define ENABLE_WAKEUP_FROM_RNE (wakeup_from_rne_enabled_p = 1)
85#define DISABLE_WAKEUP_FROM_RNE (wakeup_from_rne_enabled_p = 0)
86#else
87#define ENABLE_WAKEUP_FROM_RNE 0
88#define DISABLE_WAKEUP_FROM_RNE 0
89#endif
90
82#ifndef MAC_OSX 91#ifndef MAC_OSX
83static OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *)); 92static OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *));
84static OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int)); 93static OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int));
@@ -2431,6 +2440,7 @@ select (nfds, rfds, wfds, efds, timeout)
2431 BLOCK_INPUT block, in case that some input has already been read 2440 BLOCK_INPUT block, in case that some input has already been read
2432 asynchronously. */ 2441 asynchronously. */
2433 BLOCK_INPUT; 2442 BLOCK_INPUT;
2443 ENABLE_WAKEUP_FROM_RNE;
2434 if (!detect_input_pending ()) 2444 if (!detect_input_pending ())
2435 { 2445 {
2436#if TARGET_API_MAC_CARBON 2446#if TARGET_API_MAC_CARBON
@@ -2461,6 +2471,7 @@ select (nfds, rfds, wfds, efds, timeout)
2461 } 2471 }
2462#endif /* not TARGET_API_MAC_CARBON */ 2472#endif /* not TARGET_API_MAC_CARBON */
2463 } 2473 }
2474 DISABLE_WAKEUP_FROM_RNE;
2464 UNBLOCK_INPUT; 2475 UNBLOCK_INPUT;
2465 2476
2466 if (err == noErr) 2477 if (err == noErr)
@@ -5023,6 +5034,7 @@ select_and_poll_event (nfds, rfds, wfds, efds, timeout)
5023 BLOCK_INPUT block, in case that some input has already been read 5034 BLOCK_INPUT block, in case that some input has already been read
5024 asynchronously. */ 5035 asynchronously. */
5025 BLOCK_INPUT; 5036 BLOCK_INPUT;
5037 ENABLE_WAKEUP_FROM_RNE;
5026 if (!detect_input_pending ()) 5038 if (!detect_input_pending ())
5027 { 5039 {
5028 EMACS_TIME select_timeout; 5040 EMACS_TIME select_timeout;
@@ -5045,6 +5057,7 @@ select_and_poll_event (nfds, rfds, wfds, efds, timeout)
5045 kEventLeaveInQueue, NULL); 5057 kEventLeaveInQueue, NULL);
5046 } 5058 }
5047 } 5059 }
5060 DISABLE_WAKEUP_FROM_RNE;
5048 UNBLOCK_INPUT; 5061 UNBLOCK_INPUT;
5049 5062
5050 if (r != 0) 5063 if (r != 0)
@@ -5124,6 +5137,7 @@ sys_select (nfds, rfds, wfds, efds, timeout)
5124 BLOCK_INPUT block, in case that some input has already been 5137 BLOCK_INPUT block, in case that some input has already been
5125 read asynchronously. */ 5138 read asynchronously. */
5126 BLOCK_INPUT; 5139 BLOCK_INPUT;
5140 ENABLE_WAKEUP_FROM_RNE;
5127 if (!detect_input_pending ()) 5141 if (!detect_input_pending ())
5128 { 5142 {
5129 int minfd, fd; 5143 int minfd, fd;
@@ -5184,6 +5198,7 @@ sys_select (nfds, rfds, wfds, efds, timeout)
5184 CFRunLoopRemoveSource (runloop, source, kCFRunLoopDefaultMode); 5198 CFRunLoopRemoveSource (runloop, source, kCFRunLoopDefaultMode);
5185 } 5199 }
5186 } 5200 }
5201 DISABLE_WAKEUP_FROM_RNE;
5187 UNBLOCK_INPUT; 5202 UNBLOCK_INPUT;
5188 5203
5189 if (err == noErr || err == eventLoopQuitErr) 5204 if (err == noErr || err == eventLoopQuitErr)
@@ -5385,6 +5400,16 @@ init_mac_osx_environment ()
5385} 5400}
5386#endif /* MAC_OSX */ 5401#endif /* MAC_OSX */
5387 5402
5403#if TARGET_API_MAC_CARBON
5404void
5405mac_wakeup_from_rne ()
5406{
5407 if (wakeup_from_rne_enabled_p)
5408 /* Post a harmless event so as to wake up from
5409 ReceiveNextEvent. */
5410 mac_post_mouse_moved_event ();
5411}
5412#endif
5388 5413
5389void 5414void
5390syms_of_mac () 5415syms_of_mac ()
diff --git a/src/macfns.c b/src/macfns.c
index 2148ec3e1ad..a5de3edeec6 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -4597,6 +4597,30 @@ This is for internal use only. Use `mac-font-panel-mode' instead. */)
4597 return Qnil; 4597 return Qnil;
4598} 4598}
4599#endif 4599#endif
4600
4601#if USE_ATSUI
4602extern Lisp_Object mac_atsu_font_face_attributes P_ ((ATSUFontID));
4603
4604DEFUN ("mac-atsu-font-face-attributes", Fmac_atsu_font_face_attributes,
4605 Smac_atsu_font_face_attributes, 1, 1, 0,
4606 doc: /* Return plist of face attributes and values for ATSU font ID.
4607ID is specified by either an integer or a float. */)
4608 (id)
4609 Lisp_Object id;
4610{
4611 ATSUFontID font_id;
4612 Lisp_Object result;
4613
4614 check_mac ();
4615 CHECK_NUMBER_OR_FLOAT(id);
4616 font_id = NUMBERP (id) ? XINT (id) : (ATSUFontID) XFLOAT (id);
4617 BLOCK_INPUT;
4618 result = mac_atsu_font_face_attributes (font_id);
4619 UNBLOCK_INPUT;
4620 return result;
4621}
4622#endif
4623
4600 4624
4601/*********************************************************************** 4625/***********************************************************************
4602 Initialization 4626 Initialization
@@ -4829,6 +4853,9 @@ Chinese, Japanese, and Korean. */);
4829#if USE_MAC_FONT_PANEL 4853#if USE_MAC_FONT_PANEL
4830 defsubr (&Smac_set_font_panel_visibility); 4854 defsubr (&Smac_set_font_panel_visibility);
4831#endif 4855#endif
4856#if USE_ATSUI
4857 defsubr (&Smac_atsu_font_face_attributes);
4858#endif
4832} 4859}
4833 4860
4834/* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc 4861/* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc
diff --git a/src/macselect.c b/src/macselect.c
index 7a952f88367..8d15db24144 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -1567,8 +1567,7 @@ mac_do_receive_drag (window, refcon, drag)
1567 { 1567 {
1568 mac_store_drag_event (window, mouse_pos, modifiers, &apple_event); 1568 mac_store_drag_event (window, mouse_pos, modifiers, &apple_event);
1569 AEDisposeDesc (&apple_event); 1569 AEDisposeDesc (&apple_event);
1570 /* Post a harmless event so as to wake up from ReceiveNextEvent. */ 1570 mac_wakeup_from_rne ();
1571 mac_post_mouse_moved_event ();
1572 return noErr; 1571 return noErr;
1573 } 1572 }
1574 else 1573 else
diff --git a/src/macterm.c b/src/macterm.c
index ff36e9501c6..cb0e024b8eb 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -1156,7 +1156,8 @@ mac_query_char_extents (style, c,
1156 UniChar ch = c; 1156 UniChar ch = c;
1157 1157
1158 err = atsu_get_text_layout_with_text_ptr (&ch, 1, style, &text_layout); 1158 err = atsu_get_text_layout_with_text_ptr (&ch, 1, style, &text_layout);
1159 if (err == noErr) 1159 if (err == noErr
1160 && (font_ascent_return || font_descent_return || overall_return))
1160 { 1161 {
1161 ATSTrapezoid glyph_bounds; 1162 ATSTrapezoid glyph_bounds;
1162 1163
@@ -7006,7 +7007,6 @@ static Lisp_Object fm_font_family_alist;
7006static Lisp_Object atsu_font_id_hash; 7007static Lisp_Object atsu_font_id_hash;
7007/* Alist linking Font Manager style to face attributes. */ 7008/* Alist linking Font Manager style to face attributes. */
7008static Lisp_Object fm_style_face_attributes_alist; 7009static Lisp_Object fm_style_face_attributes_alist;
7009static Lisp_Object Vmac_atsu_font_table;
7010extern Lisp_Object QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic; 7010extern Lisp_Object QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic;
7011#endif 7011#endif
7012 7012
@@ -7243,6 +7243,73 @@ add_mac_font_name (name, size, style, charset)
7243} 7243}
7244 7244
7245#if USE_ATSUI 7245#if USE_ATSUI
7246static FMFontStyle
7247fm_get_style_from_font (font)
7248 FMFont font;
7249{
7250 OSStatus err;
7251 FMFontStyle style = normal;
7252 ByteCount len;
7253 UInt16 mac_style;
7254 FMFontFamily font_family;
7255#define FONT_HEADER_MAC_STYLE_OFFSET (4*4 + 2*2 + 8*2 + 2*4)
7256
7257 /* FMGetFontFamilyInstanceFromFont returns `normal' as the style of
7258 some font (e.g., Optima) even if it is `bold'. */
7259 err = FMGetFontTable (font, 'head', FONT_HEADER_MAC_STYLE_OFFSET,
7260 sizeof (mac_style), &mac_style, &len);
7261 if (err == noErr
7262 && len >= FONT_HEADER_MAC_STYLE_OFFSET + sizeof (mac_style))
7263 style = EndianU16_BtoN (mac_style);
7264 else
7265 FMGetFontFamilyInstanceFromFont (font, &font_family, &style);
7266
7267 return style;
7268}
7269
7270static ATSUFontID
7271atsu_find_font_from_family_name (family)
7272 const char *family;
7273{
7274 struct Lisp_Hash_Table *h = XHASH_TABLE (atsu_font_id_hash);
7275 unsigned hash_code;
7276 int i;
7277 Lisp_Object rest, best;
7278 FMFontStyle min_style, style;
7279
7280 i = hash_lookup (h, make_unibyte_string (family, strlen (family)),
7281 &hash_code);
7282 if (i < 0)
7283 return kATSUInvalidFontID;
7284
7285 rest = HASH_VALUE (h, i);
7286 if (INTEGERP (rest) || (CONSP (rest) && INTEGERP (XCDR (rest))))
7287 return cons_to_long (rest);
7288
7289 rest = Fnreverse (rest);
7290 best = XCAR (rest);
7291 rest = XCDR (rest);
7292 if (!NILP (rest)
7293 && (min_style = fm_get_style_from_font (cons_to_long (best))) != normal)
7294 do
7295 {
7296 style = fm_get_style_from_font (cons_to_long (XCAR (rest)));
7297 if (style < min_style)
7298 {
7299 best = XCAR (rest);
7300 if (style == normal)
7301 break;
7302 else
7303 min_style = style;
7304 }
7305 rest = XCDR (rest);
7306 }
7307 while (!NILP (rest));
7308
7309 HASH_VALUE (h, i) = best;
7310 return cons_to_long (best);
7311}
7312
7246static Lisp_Object 7313static Lisp_Object
7247fm_style_to_face_attributes (fm_style) 7314fm_style_to_face_attributes (fm_style)
7248 FMFontStyle fm_style; 7315 FMFontStyle fm_style;
@@ -7263,6 +7330,44 @@ fm_style_to_face_attributes (fm_style)
7263 7330
7264 return tem; 7331 return tem;
7265} 7332}
7333
7334static Lisp_Object
7335atsu_find_font_family_name (font_id)
7336 ATSUFontID font_id;
7337{
7338 OSStatus err;
7339 ByteCount len;
7340 Lisp_Object family = Qnil;
7341
7342 err = ATSUFindFontName (font_id, kFontFamilyName,
7343 kFontMacintoshPlatform, kFontNoScript,
7344 kFontNoLanguage, 0, NULL, &len, NULL);
7345 if (err == noErr)
7346 {
7347 family = make_uninit_string (len);
7348 err = ATSUFindFontName (font_id, kFontFamilyName,
7349 kFontMacintoshPlatform, kFontNoScript,
7350 kFontNoLanguage, len, SDATA (family),
7351 NULL, NULL);
7352 }
7353 if (err == noErr)
7354 decode_mac_font_name (SDATA (family), len + 1, Qnil);
7355
7356 return family;
7357}
7358
7359Lisp_Object
7360mac_atsu_font_face_attributes (font_id)
7361 ATSUFontID font_id;
7362{
7363 Lisp_Object family, style_attrs;
7364
7365 family = atsu_find_font_family_name (font_id);
7366 if (NILP (family))
7367 return Qnil;
7368 style_attrs = fm_style_to_face_attributes (fm_get_style_from_font (font_id));
7369 return Fcons (QCfamily, Fcons (family, style_attrs));
7370}
7266#endif 7371#endif
7267 7372
7268/* Sets up the table font_name_table to contain the list of all fonts 7373/* Sets up the table font_name_table to contain the list of all fonts
@@ -7294,9 +7399,8 @@ init_font_name_table ()
7294 unsigned hash_code; 7399 unsigned hash_code;
7295 ItemCount nfonts, i; 7400 ItemCount nfonts, i;
7296 ATSUFontID *font_ids = NULL; 7401 ATSUFontID *font_ids = NULL;
7297 Ptr name; 7402 Lisp_Object prev_family = Qnil;
7298 ByteCount name_len; 7403 int j;
7299 Lisp_Object family;
7300 7404
7301 atsu_font_id_hash = 7405 atsu_font_id_hash =
7302 make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE), 7406 make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE),
@@ -7314,41 +7418,25 @@ init_font_name_table ()
7314 if (err == noErr) 7418 if (err == noErr)
7315 for (i = 0; i < nfonts; i++) 7419 for (i = 0; i < nfonts; i++)
7316 { 7420 {
7317 err = ATSUFindFontName (font_ids[i], kFontFamilyName, 7421 Lisp_Object family;
7318 kFontMacintoshPlatform, kFontNoScript, 7422
7319 kFontNoLanguage, 0, NULL, &name_len, NULL); 7423 family = atsu_find_font_family_name (font_ids[i]);
7320 if (err != noErr) 7424 if (NILP (family) || SREF (family, 0) == '.')
7321 continue; 7425 continue;
7322 name = xmalloc (name_len + 1); 7426 if (!NILP (Fequal (prev_family, family)))
7323 name[name_len] = '\0'; 7427 family = prev_family;
7324 err = ATSUFindFontName (font_ids[i], kFontFamilyName, 7428 else
7325 kFontMacintoshPlatform, kFontNoScript, 7429 j = hash_lookup (h, family, &hash_code);
7326 kFontNoLanguage, name_len, name, 7430 if (j < 0)
7327 NULL, NULL);
7328 if (err == noErr)
7329 { 7431 {
7330 FMFontFamily ff; 7432 add_mac_font_name (SDATA (family), 0, normal, "iso10646-1");
7331 FMFontStyle style = normal; 7433 j = hash_put (h, family, Fcons (long_to_cons (font_ids[i]),
7332 7434 Qnil), hash_code);
7333 decode_mac_font_name (name, name_len + 1, Qnil);
7334 family = make_unibyte_string (name, name_len);
7335 FMGetFontFamilyInstanceFromFont (font_ids[i], &ff, &style);
7336 Fputhash ((font_ids[i] > MOST_POSITIVE_FIXNUM
7337 ? make_float (font_ids[i])
7338 : make_number (font_ids[i])),
7339 Fcons (QCfamily,
7340 Fcons (family,
7341 fm_style_to_face_attributes (style))),
7342 Vmac_atsu_font_table);
7343 if (*name != '.'
7344 && hash_lookup (h, family, &hash_code) < 0)
7345 {
7346 add_mac_font_name (name, 0, normal, "iso10646-1");
7347 hash_put (h, family, long_to_cons (font_ids[i]),
7348 hash_code);
7349 }
7350 } 7435 }
7351 xfree (name); 7436 else if (EQ (prev_family, family))
7437 HASH_VALUE (h, j) = Fcons (long_to_cons (font_ids[i]),
7438 HASH_VALUE (h, j));
7439 prev_family = family;
7352 } 7440 }
7353 if (font_ids) 7441 if (font_ids)
7354 xfree (font_ids); 7442 xfree (font_ids);
@@ -7892,14 +7980,11 @@ mac_load_query_font (f, fontname)
7892 {kAllTypographicFeaturesType, kDiacriticsType}; 7980 {kAllTypographicFeaturesType, kDiacriticsType};
7893 static const ATSUFontFeatureSelector selectors[] = 7981 static const ATSUFontFeatureSelector selectors[] =
7894 {kAllTypeFeaturesOffSelector, kDecomposeDiacriticsSelector}; 7982 {kAllTypeFeaturesOffSelector, kDecomposeDiacriticsSelector};
7895 Lisp_Object font_id_cons;
7896 FMFontStyle style; 7983 FMFontStyle style;
7897 7984
7898 font_id_cons = Fgethash (make_unibyte_string (family, strlen (family)), 7985 font_id = atsu_find_font_from_family_name (family);
7899 atsu_font_id_hash, Qnil); 7986 if (font_id == kATSUInvalidFontID)
7900 if (NILP (font_id_cons)) 7987 return;
7901 return NULL;
7902 font_id = cons_to_long (font_id_cons);
7903 size_fixed = Long2Fix (size); 7988 size_fixed = Long2Fix (size);
7904 bold_p = (fontface & bold) != 0; 7989 bold_p = (fontface & bold) != 0;
7905 italic_p = (fontface & italic) != 0; 7990 italic_p = (fontface & italic) != 0;
@@ -8023,11 +8108,19 @@ mac_load_query_font (f, fontname)
8023 continue; 8108 continue;
8024 else if (c == 0x7f) 8109 else if (c == 0x7f)
8025 { 8110 {
8026 c = 0x9f; 8111#if USE_CG_TEXT_DRAWING
8027 continue; 8112 if (font->cg_glyphs)
8113 {
8114 c = 0x9f;
8115 pcm = NULL;
8116 continue;
8117 }
8118#endif
8119 break;
8028 } 8120 }
8029 8121
8030 mac_query_char_extents (font->mac_style, c, NULL, NULL, pcm + c, 8122 mac_query_char_extents (font->mac_style, c, NULL, NULL,
8123 pcm ? pcm + c : NULL,
8031#if USE_CG_TEXT_DRAWING 8124#if USE_CG_TEXT_DRAWING
8032 (font->cg_glyphs ? font->cg_glyphs + c 8125 (font->cg_glyphs ? font->cg_glyphs + c
8033 : NULL) 8126 : NULL)
@@ -8045,6 +8138,8 @@ mac_load_query_font (f, fontname)
8045 font->cg_font = NULL; 8138 font->cg_font = NULL;
8046 xfree (font->cg_glyphs); 8139 xfree (font->cg_glyphs);
8047 font->cg_glyphs = NULL; 8140 font->cg_glyphs = NULL;
8141 if (pcm == NULL)
8142 break;
8048 } 8143 }
8049#endif 8144#endif
8050 } 8145 }
@@ -8052,6 +8147,7 @@ mac_load_query_font (f, fontname)
8052 else 8147 else
8053#endif 8148#endif
8054 { 8149 {
8150 OSStatus err;
8055 FontInfo the_fontinfo; 8151 FontInfo the_fontinfo;
8056 int is_two_byte_font; 8152 int is_two_byte_font;
8057 8153
@@ -8134,8 +8230,13 @@ mac_load_query_font (f, fontname)
8134 sizeof (XCharStruct) * (0xff - 0x20 + 1)); 8230 sizeof (XCharStruct) * (0xff - 0x20 + 1));
8135 8231
8136 space_bounds = font->bounds.per_char; 8232 space_bounds = font->bounds.per_char;
8137 mac_query_char_extents (NULL, 0x20, &font->ascent, &font->descent, 8233 err = mac_query_char_extents (NULL, 0x20, &font->ascent,
8138 space_bounds, NULL); 8234 &font->descent, space_bounds, NULL);
8235 if (err != noErr || space_bounds->width <= 0)
8236 {
8237 mac_unload_font (&one_mac_display_info, font);
8238 return NULL;
8239 }
8139 8240
8140 for (c = 0x21, pcm = space_bounds + 1; c <= 0xff; c++, pcm++) 8241 for (c = 0x21, pcm = space_bounds + 1; c <= 0xff; c++, pcm++)
8141 mac_query_char_extents (NULL, c, NULL, NULL, pcm, NULL); 8242 mac_query_char_extents (NULL, c, NULL, NULL, pcm, NULL);
@@ -9386,9 +9487,7 @@ mac_store_event_ref_as_apple_event (class, id, class_key, id_key,
9386 { 9487 {
9387 mac_store_apple_event (class_key, id_key, &apple_event); 9488 mac_store_apple_event (class_key, id_key, &apple_event);
9388 AEDisposeDesc (&apple_event); 9489 AEDisposeDesc (&apple_event);
9389 /* Post a harmless event so as to wake up from 9490 mac_wakeup_from_rne ();
9390 ReceiveNextEvent. */
9391 mac_post_mouse_moved_event ();
9392 } 9491 }
9393 } 9492 }
9394 } 9493 }
@@ -10401,7 +10500,9 @@ XTread_socket (sd, expected, hold_quit)
10401#else 10500#else
10402 FrontWindow () 10501 FrontWindow ()
10403#endif 10502#endif
10404 != window_ptr) 10503 != window_ptr
10504 || (mac_window_to_frame (window_ptr)
10505 != dpyinfo->x_focus_frame))
10405 SelectWindow (window_ptr); 10506 SelectWindow (window_ptr);
10406 else 10507 else
10407 { 10508 {
@@ -11673,7 +11774,7 @@ syms_of_macterm ()
11673 DEFVAR_BOOL ("x-use-underline-position-properties", 11774 DEFVAR_BOOL ("x-use-underline-position-properties",
11674 &x_use_underline_position_properties, 11775 &x_use_underline_position_properties,
11675 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. 11776 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties.
11676nil means ignore them. If you encounter fonts with bogus 11777A value of nil means ignore them. If you encounter fonts with bogus
11677UNDERLINE_POSITION font properties, for example 7x13 on XFree prior 11778UNDERLINE_POSITION font properties, for example 7x13 on XFree prior
11678to 4.1, set this to nil. 11779to 4.1, set this to nil.
11679 11780
@@ -11683,9 +11784,9 @@ NOTE: Not supported on Mac yet. */);
11683 DEFVAR_BOOL ("x-underline-at-descent-line", 11784 DEFVAR_BOOL ("x-underline-at-descent-line",
11684 &x_underline_at_descent_line, 11785 &x_underline_at_descent_line,
11685 doc: /* *Non-nil means to draw the underline at the same place as the descent line. 11786 doc: /* *Non-nil means to draw the underline at the same place as the descent line.
11686nil means to draw the underline according to the value of the variable 11787A value of nil means to draw the underline according to the value of the
11687`x-use-underline-position-properties', which is usually at the baseline 11788variable `x-use-underline-position-properties', which is usually at the
11688level. The default value is nil. */); 11789baseline level. The default value is nil. */);
11689 x_underline_at_descent_line = 0; 11790 x_underline_at_descent_line = 0;
11690 11791
11691 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, 11792 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
@@ -11732,8 +11833,8 @@ unexpected results for some keys on non-US/GB keyboards. */);
11732 &Vmac_emulate_three_button_mouse, 11833 &Vmac_emulate_three_button_mouse,
11733 doc: /* *Specify a way of three button mouse emulation. 11834 doc: /* *Specify a way of three button mouse emulation.
11734The value can be nil, t, or the symbol `reverse'. 11835The value can be nil, t, or the symbol `reverse'.
11735nil means that no emulation should be done and the modifiers should be 11836A value of nil means that no emulation should be done and the modifiers
11736placed on the mouse-1 event. 11837should be placed on the mouse-1 event.
11737t means that when the option-key is held down while pressing the mouse 11838t means that when the option-key is held down while pressing the mouse
11738button, the click will register as mouse-2 and while the command-key 11839button, the click will register as mouse-2 and while the command-key
11739is held down, the click will register as mouse-3. 11840is held down, the click will register as mouse-3.
@@ -11784,15 +11885,6 @@ CODING_SYSTEM is a coding system corresponding to TEXT-ENCODING. */);
11784 Fcons (list3 (build_string ("mac-roman"), 11885 Fcons (list3 (build_string ("mac-roman"),
11785 make_number (smRoman), Qnil), Qnil); 11886 make_number (smRoman), Qnil), Qnil);
11786 11887
11787#if USE_ATSUI
11788 DEFVAR_LISP ("mac-atsu-font-table", &Vmac_atsu_font_table,
11789 doc: /* Hash table of ATSU font IDs vs plist of attributes and values. */);
11790 Vmac_atsu_font_table =
11791 make_hash_table (Qeql, make_number (DEFAULT_HASH_SIZE),
11792 make_float (DEFAULT_REHASH_SIZE),
11793 make_float (DEFAULT_REHASH_THRESHOLD),
11794 Qnil, Qnil, Qnil);
11795#endif
11796#if USE_MAC_TSM 11888#if USE_MAC_TSM
11797 DEFVAR_LISP ("mac-ts-active-input-overlay", &Vmac_ts_active_input_overlay, 11889 DEFVAR_LISP ("mac-ts-active-input-overlay", &Vmac_ts_active_input_overlay,
11798 doc: /* Overlay used to display Mac TSM active input area. */); 11890 doc: /* Overlay used to display Mac TSM active input area. */);
diff --git a/src/macterm.h b/src/macterm.h
index cac90f1fa80..856d349f6f7 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -685,6 +685,7 @@ extern Lisp_Object cfdate_to_lisp P_ ((CFDateRef));
685extern Lisp_Object cfboolean_to_lisp P_ ((CFBooleanRef)); 685extern Lisp_Object cfboolean_to_lisp P_ ((CFBooleanRef));
686extern Lisp_Object cfobject_desc_to_lisp P_ ((CFTypeRef)); 686extern Lisp_Object cfobject_desc_to_lisp P_ ((CFTypeRef));
687extern Lisp_Object cfproperty_list_to_lisp P_ ((CFPropertyListRef, int, int)); 687extern Lisp_Object cfproperty_list_to_lisp P_ ((CFPropertyListRef, int, int));
688extern void mac_wakeup_from_rne P_ ((void));
688#endif 689#endif
689extern void xrm_merge_string_database P_ ((XrmDatabase, const char *)); 690extern void xrm_merge_string_database P_ ((XrmDatabase, const char *));
690extern Lisp_Object xrm_get_resource P_ ((XrmDatabase, const char *, 691extern Lisp_Object xrm_get_resource P_ ((XrmDatabase, const char *,
diff --git a/src/marker.c b/src/marker.c
index 9f2aa4826b4..bac8e46fc3f 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -848,7 +848,7 @@ see `marker-insertion-type'. */)
848DEFUN ("marker-insertion-type", Fmarker_insertion_type, 848DEFUN ("marker-insertion-type", Fmarker_insertion_type,
849 Smarker_insertion_type, 1, 1, 0, 849 Smarker_insertion_type, 1, 1, 0,
850 doc: /* Return insertion type of MARKER: t if it stays after inserted text. 850 doc: /* Return insertion type of MARKER: t if it stays after inserted text.
851nil means the marker stays before text inserted there. */) 851The value nil means the marker stays before text inserted there. */)
852 (marker) 852 (marker)
853 register Lisp_Object marker; 853 register Lisp_Object marker;
854{ 854{
diff --git a/src/minibuf.c b/src/minibuf.c
index 316f487e0ff..2397ea4b085 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2868,10 +2868,10 @@ The value may alternatively be a function, which is given three arguments:
2868 STRING, the current buffer contents; 2868 STRING, the current buffer contents;
2869 PREDICATE, the predicate for filtering possible matches; 2869 PREDICATE, the predicate for filtering possible matches;
2870 CODE, which says what kind of things to do. 2870 CODE, which says what kind of things to do.
2871CODE can be nil, t or `lambda'. 2871CODE can be nil, t or `lambda':
2872nil means to return the best completion of STRING, or nil if there is none. 2872 nil -- return the best completion of STRING, or nil if there is none.
2873t means to return a list of all possible completions of STRING. 2873 t -- return a list of all possible completions of STRING.
2874`lambda' means to return t if STRING is a valid completion as it stands. */); 2874 lambda -- return t if STRING is a valid completion as it stands. */);
2875 Vminibuffer_completion_table = Qnil; 2875 Vminibuffer_completion_table = Qnil;
2876 2876
2877 DEFVAR_LISP ("minibuffer-completion-predicate", &Vminibuffer_completion_predicate, 2877 DEFVAR_LISP ("minibuffer-completion-predicate", &Vminibuffer_completion_predicate,
diff --git a/src/msdos.c b/src/msdos.c
index 4a39ce75ae1..4e989402a80 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -5300,7 +5300,7 @@ This variable is used only by MSDOS terminals. */);
5300#ifndef subprocesses 5300#ifndef subprocesses
5301 DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes, 5301 DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes,
5302 doc: /* *Non-nil means delete processes immediately when they exit. 5302 doc: /* *Non-nil means delete processes immediately when they exit.
5303nil means don't delete them until `list-processes' is run. */); 5303A value of nil means don't delete them until `list-processes' is run. */);
5304 delete_exited_processes = 0; 5304 delete_exited_processes = 0;
5305#endif 5305#endif
5306 5306
diff --git a/src/msdos.h b/src/msdos.h
index 8bfbcf2d10c..cbe65818867 100644
--- a/src/msdos.h
+++ b/src/msdos.h
@@ -53,7 +53,7 @@ typedef int Pixmap;
53typedef int Display; 53typedef int Display;
54typedef int Window; 54typedef int Window;
55typedef int XRectangle; 55typedef int XRectangle;
56#define PIX_TYPE int 56#define PIX_TYPE unsigned long
57#define XDISPLAY 57#define XDISPLAY
58 58
59/* A stripped version of struct x_display_info in xterm.h, which see. */ 59/* A stripped version of struct x_display_info in xterm.h, which see. */
diff --git a/src/process.c b/src/process.c
index db7fcb8b201..663170e685e 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6083,7 +6083,7 @@ If PROCESS is a network process, resume handling of incoming traffic. */)
6083DEFUN ("signal-process", Fsignal_process, Ssignal_process, 6083DEFUN ("signal-process", Fsignal_process, Ssignal_process,
6084 2, 2, "sProcess (name or number): \nnSignal code: ", 6084 2, 2, "sProcess (name or number): \nnSignal code: ",
6085 doc: /* Send PROCESS the signal with code SIGCODE. 6085 doc: /* Send PROCESS the signal with code SIGCODE.
6086PROCESS may also be an integer specifying the process id of the 6086PROCESS may also be a number specifying the process id of the
6087process to signal; in this case, the process need not be a child of 6087process to signal; in this case, the process need not be a child of
6088this Emacs. 6088this Emacs.
6089SIGCODE may be an integer, or a symbol whose name is a signal name. */) 6089SIGCODE may be an integer, or a symbol whose name is a signal name. */)
@@ -6100,7 +6100,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6100 6100
6101 if (FLOATP (process)) 6101 if (FLOATP (process))
6102 { 6102 {
6103 pid = (pid_t) XFLOAT (process); 6103 pid = (pid_t) XFLOAT_DATA (process);
6104 goto got_it; 6104 goto got_it;
6105 } 6105 }
6106 6106
@@ -6129,7 +6129,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6129 got_it: 6129 got_it:
6130 6130
6131#define parse_signal(NAME, VALUE) \ 6131#define parse_signal(NAME, VALUE) \
6132 else if (!strcasecmp (name, NAME)) \ 6132 else if (!xstricmp (name, NAME)) \
6133 XSETINT (sigcode, VALUE) 6133 XSETINT (sigcode, VALUE)
6134 6134
6135 if (INTEGERP (sigcode)) 6135 if (INTEGERP (sigcode))
@@ -6141,7 +6141,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6141 CHECK_SYMBOL (sigcode); 6141 CHECK_SYMBOL (sigcode);
6142 name = SDATA (SYMBOL_NAME (sigcode)); 6142 name = SDATA (SYMBOL_NAME (sigcode));
6143 6143
6144 if (!strncasecmp(name, "sig", 3)) 6144 if (!strncmp(name, "SIG", 3) || !strncmp(name, "sig", 3))
6145 name += 3; 6145 name += 3;
6146 6146
6147 if (0) 6147 if (0)
diff --git a/src/syntax.c b/src/syntax.c
index a85746be362..d1ae3f6bd8c 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -893,7 +893,7 @@ DEFUN ("string-to-syntax", Fstring_to_syntax, Sstring_to_syntax, 1, 1, 0,
893 doc: /* Convert a syntax specification STRING into syntax cell form. 893 doc: /* Convert a syntax specification STRING into syntax cell form.
894STRING should be a string as it is allowed as argument of 894STRING should be a string as it is allowed as argument of
895`modify-syntax-entry'. Value is the equivalent cons cell 895`modify-syntax-entry'. Value is the equivalent cons cell
896(CODE . MATCHING-CHAR) that can be used as value of a `syntax-table' 896\(CODE . MATCHING-CHAR) that can be used as value of a `syntax-table'
897text property. */) 897text property. */)
898 (string) 898 (string)
899 Lisp_Object string; 899 Lisp_Object string;
@@ -3270,7 +3270,7 @@ Fourth arg STOPBEFORE non-nil means stop when come to
3270 any character that starts a sexp. 3270 any character that starts a sexp.
3271Fifth arg OLDSTATE is a list like what this function returns. 3271Fifth arg OLDSTATE is a list like what this function returns.
3272 It is used to initialize the state of the parse. Elements number 1, 2, 6 3272 It is used to initialize the state of the parse. Elements number 1, 2, 6
3273 and 8 are ignored; you can leave off element 8 (the last) entirely. 3273 and 8 are ignored.
3274Sixth arg COMMENTSTOP non-nil means stop at the start of a comment. 3274Sixth arg COMMENTSTOP non-nil means stop at the start of a comment.
3275 If it is symbol `syntax-table', stop after the start of a comment or a 3275 If it is symbol `syntax-table', stop after the start of a comment or a
3276 string, or after end of a comment or a string. */) 3276 string, or after end of a comment or a string. */)
diff --git a/src/systime.h b/src/systime.h
index 00373b257b3..e7ff2b2a3b7 100644
--- a/src/systime.h
+++ b/src/systime.h
@@ -101,16 +101,8 @@ extern time_t timezone;
101#ifdef GETTIMEOFDAY_ONE_ARGUMENT 101#ifdef GETTIMEOFDAY_ONE_ARGUMENT
102#define EMACS_GET_TIME(time) gettimeofday (&(time)) 102#define EMACS_GET_TIME(time) gettimeofday (&(time))
103#else /* not GETTIMEOFDAY_ONE_ARGUMENT */ 103#else /* not GETTIMEOFDAY_ONE_ARGUMENT */
104#ifdef HAVE_STRUCT_TIMEZONE
105#define EMACS_GET_TIME(time) \
106 do { \
107 struct timezone dummy; \
108 gettimeofday (&(time), &dummy); \
109 } while (0)
110#else
111/* Presumably the second arg is ignored. */ 104/* Presumably the second arg is ignored. */
112#define EMACS_GET_TIME(time) gettimeofday (&(time), NULL) 105#define EMACS_GET_TIME(time) gettimeofday (&(time), NULL)
113#endif /* HAVE_STRUCT_TIMEZONE */
114#endif /* not GETTIMEOFDAY_ONE_ARGUMENT */ 106#endif /* not GETTIMEOFDAY_ONE_ARGUMENT */
115 107
116#define EMACS_ADD_TIME(dest, src1, src2) \ 108#define EMACS_ADD_TIME(dest, src1, src2) \
diff --git a/src/w32fns.c b/src/w32fns.c
index 1ab44486852..65362099bf9 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -3707,8 +3707,11 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3707 However for top/left sizing we will need to fix the X 3707 However for top/left sizing we will need to fix the X
3708 and Y positions as well. */ 3708 and Y positions as well. */
3709 3709
3710 lppos->cx -= wdiff; 3710 int cx_mintrack = GetSystemMetrics (SM_CXMINTRACK);
3711 lppos->cy -= hdiff; 3711 int cy_mintrack = GetSystemMetrics (SM_CYMINTRACK);
3712
3713 lppos->cx = max (lppos->cx - wdiff, cx_mintrack);
3714 lppos->cy = max (lppos->cy - hdiff, cy_mintrack);
3712 3715
3713 if (wp.showCmd != SW_SHOWMAXIMIZED 3716 if (wp.showCmd != SW_SHOWMAXIMIZED
3714 && (lppos->flags & SWP_NOMOVE) == 0) 3717 && (lppos->flags & SWP_NOMOVE) == 0)
@@ -3732,9 +3735,6 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3732 goto dflt; 3735 goto dflt;
3733 3736
3734 case WM_GETMINMAXINFO: 3737 case WM_GETMINMAXINFO:
3735 /* Hack to correct bug that allows Emacs frames to be resized
3736 below the Minimum Tracking Size. */
3737 ((LPMINMAXINFO) lParam)->ptMinTrackSize.y++;
3738 /* Hack to allow resizing the Emacs frame above the screen size. 3738 /* Hack to allow resizing the Emacs frame above the screen size.
3739 Note that Windows 9x limits coordinates to 16-bits. */ 3739 Note that Windows 9x limits coordinates to 16-bits. */
3740 ((LPMINMAXINFO) lParam)->ptMaxTrackSize.x = 32767; 3740 ((LPMINMAXINFO) lParam)->ptMaxTrackSize.x = 32767;
diff --git a/src/w32term.c b/src/w32term.c
index 89be876b920..992bbc76aad 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -6693,7 +6693,7 @@ the cursor have no effect. */);
6693 DEFVAR_BOOL ("x-use-underline-position-properties", 6693 DEFVAR_BOOL ("x-use-underline-position-properties",
6694 &x_use_underline_position_properties, 6694 &x_use_underline_position_properties,
6695 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. 6695 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties.
6696nil means ignore them. If you encounter fonts with bogus 6696A value of nil means ignore them. If you encounter fonts with bogus
6697UNDERLINE_POSITION font properties, for example 7x13 on XFree prior 6697UNDERLINE_POSITION font properties, for example 7x13 on XFree prior
6698to 4.1, set this to nil. 6698to 4.1, set this to nil.
6699 6699
@@ -6703,9 +6703,9 @@ NOTE: Not supported on MS-Windows yet. */);
6703 DEFVAR_BOOL ("x-underline-at-descent-line", 6703 DEFVAR_BOOL ("x-underline-at-descent-line",
6704 &x_underline_at_descent_line, 6704 &x_underline_at_descent_line,
6705 doc: /* *Non-nil means to draw the underline at the same place as the descent line. 6705 doc: /* *Non-nil means to draw the underline at the same place as the descent line.
6706nil means to draw the underline according to the value of the variable 6706A value of nil means to draw the underline according to the value of the
6707`x-use-underline-position-properties', which is usually at the baseline 6707variable `x-use-underline-position-properties', which is usually at the
6708level. The default value is nil. */); 6708baseline level. The default value is nil. */);
6709 x_underline_at_descent_line = 0; 6709 x_underline_at_descent_line = 0;
6710 6710
6711 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, 6711 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
diff --git a/src/xdisp.c b/src/xdisp.c
index 957340674f6..63998ddf8f7 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13600,8 +13600,11 @@ redisplay_window (window, just_this_one_p)
13600 13600
13601#endif 13601#endif
13602 13602
13603 if (redisplay_tool_bar_p) 13603 if (redisplay_tool_bar_p && redisplay_tool_bar (f))
13604 redisplay_tool_bar (f); 13604 {
13605 extern int ignore_mouse_drag_p;
13606 ignore_mouse_drag_p = 1;
13607 }
13605#endif 13608#endif
13606 } 13609 }
13607 13610
@@ -17407,9 +17410,9 @@ for details) to use.
17407 17410
17408Optional second arg FACE specifies the face property to put 17411Optional second arg FACE specifies the face property to put
17409on all characters for which no face is specified. 17412on all characters for which no face is specified.
17410t means whatever face the window's mode line currently uses 17413The value t means whatever face the window's mode line currently uses
17411\(either `mode-line' or `mode-line-inactive', depending). 17414\(either `mode-line' or `mode-line-inactive', depending).
17412nil means the default is no face property. 17415A value of nil means the default is no face property.
17413If FACE is an integer, the value string has no text properties. 17416If FACE is an integer, the value string has no text properties.
17414 17417
17415Optional third and fourth args WINDOW and BUFFER specify the window 17418Optional third and fourth args WINDOW and BUFFER specify the window
@@ -22155,7 +22158,7 @@ show_mouse_face (dpyinfo, draw)
22155 } 22158 }
22156 22159
22157 /* Change the mouse cursor. */ 22160 /* Change the mouse cursor. */
22158 if (draw == DRAW_NORMAL_TEXT) 22161 if (draw == DRAW_NORMAL_TEXT && !EQ (dpyinfo->mouse_face_window, f->tool_bar_window))
22159 rif->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor); 22162 rif->define_frame_cursor (f, FRAME_X_OUTPUT (f)->text_cursor);
22160 else if (draw == DRAW_MOUSE_FACE) 22163 else if (draw == DRAW_MOUSE_FACE)
22161 rif->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor); 22164 rif->define_frame_cursor (f, FRAME_X_OUTPUT (f)->hand_cursor);
@@ -24276,7 +24279,7 @@ Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI). */);
24276 truncate_partial_width_windows = 1; 24279 truncate_partial_width_windows = 1;
24277 24280
24278 DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, 24281 DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video,
24279 doc: /* nil means display the mode-line/header-line/menu-bar in the default face. 24282 doc: /* When nil, display the mode-line/header-line/menu-bar in the default face.
24280Any other value means to use the appropriate face, `mode-line', 24283Any other value means to use the appropriate face, `mode-line',
24281`header-line', or `menu' respectively. */); 24284`header-line', or `menu' respectively. */);
24282 mode_line_inverse_video = 1; 24285 mode_line_inverse_video = 1;
diff --git a/src/xterm.c b/src/xterm.c
index 277f0431a3b..977325f0b75 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8608,15 +8608,15 @@ do_ewmh_fullscreen (f)
8608 Atom *atoms = XListProperties (FRAME_X_DISPLAY (f), 8608 Atom *atoms = XListProperties (FRAME_X_DISPLAY (f),
8609 FRAME_X_DISPLAY_INFO (f)->root_window, 8609 FRAME_X_DISPLAY_INFO (f)->root_window,
8610 &num); 8610 &num);
8611 if (atoms && num > 0) 8611 if (atoms && num > 0)
8612 { 8612 {
8613 char **names = (char **) xmalloc (num * sizeof(*names)); 8613 char **names = (char **) xmalloc (num * sizeof(*names));
8614 if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names)) 8614 if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names))
8615 { 8615 {
8616 int i; 8616 int i;
8617 for (i = 0; i < num; ++i) 8617 for (i = 0; i < num; ++i)
8618 { 8618 {
8619 if (!have_net_atom) 8619 if (!have_net_atom)
8620 have_net_atom = strncmp (names[i], "_NET_", 5) == 0; 8620 have_net_atom = strncmp (names[i], "_NET_", 5) == 0;
8621 XFree (names[i]); 8621 XFree (names[i]);
8622 } 8622 }
@@ -8629,7 +8629,7 @@ do_ewmh_fullscreen (f)
8629 FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom; 8629 FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom;
8630 } 8630 }
8631 8631
8632 if (have_net_atom) 8632 if (have_net_atom)
8633 { 8633 {
8634 Lisp_Object frame; 8634 Lisp_Object frame;
8635 const char *atom = "_NET_WM_STATE"; 8635 const char *atom = "_NET_WM_STATE";
@@ -8642,7 +8642,7 @@ do_ewmh_fullscreen (f)
8642 8642
8643 /* If there are _NET_ atoms we assume we have extended window manager 8643 /* If there are _NET_ atoms we assume we have extended window manager
8644 hints. */ 8644 hints. */
8645 switch (f->want_fullscreen) 8645 switch (f->want_fullscreen)
8646 { 8646 {
8647 case FULLSCREEN_BOTH: 8647 case FULLSCREEN_BOTH:
8648 what = fs; 8648 what = fs;
@@ -8698,7 +8698,7 @@ static void
8698XTfullscreen_hook (f) 8698XTfullscreen_hook (f)
8699 FRAME_PTR f; 8699 FRAME_PTR f;
8700{ 8700{
8701 if (f->async_visible) 8701 if (f->async_visible)
8702 { 8702 {
8703 BLOCK_INPUT; 8703 BLOCK_INPUT;
8704 do_ewmh_fullscreen (f); 8704 do_ewmh_fullscreen (f);
@@ -8718,7 +8718,7 @@ x_check_fullscreen (f)
8718 { 8718 {
8719 int width, height, ign; 8719 int width, height, ign;
8720 8720
8721 if (do_ewmh_fullscreen (f)) 8721 if (do_ewmh_fullscreen (f))
8722 return; 8722 return;
8723 8723
8724 x_real_positions (f, &f->left_pos, &f->top_pos); 8724 x_real_positions (f, &f->left_pos, &f->top_pos);
@@ -9052,20 +9052,26 @@ XTframe_raise_lower (f, raise_flag)
9052{ 9052{
9053 if (raise_flag) 9053 if (raise_flag)
9054 { 9054 {
9055 Lisp_Object frame; 9055 /* The following code is needed for `raise-frame' to work on
9056 const char *atom = "_NET_ACTIVE_WINDOW"; 9056 some versions of metacity; see Window Manager
9057 Specification/Extended Window Manager Hints at
9058 http://freedesktop.org/wiki/Standards_2fwm_2dspec
9059
9060 However, on other versions (metacity 2.17.2-1.fc7), it
9061 reportedly causes hangs when resizing frames. */
9062
9063 /* Lisp_Object frame;
9064 const char *atom = "_NET_ACTIVE_WINDOW"; */
9057 9065
9058 x_raise_frame (f); 9066 x_raise_frame (f);
9059 /* See Window Manager Specification/Extended Window Manager Hints at
9060 http://freedesktop.org/wiki/Standards_2fwm_2dspec */
9061 9067
9062 XSETFRAME (frame, f); 9068 /* XSETFRAME (frame, f);
9063 Fx_send_client_event (frame, make_number (0), frame, 9069 Fx_send_client_event (frame, make_number (0), frame,
9064 make_unibyte_string (atom, strlen (atom)), 9070 make_unibyte_string (atom, strlen (atom)),
9065 make_number (32), 9071 make_number (32),
9066 Fcons (make_number (1), 9072 Fcons (make_number (1),
9067 Fcons (make_number (time (NULL) * 1000), 9073 Fcons (make_number (time (NULL) * 1000),
9068 Qnil))); 9074 Qnil))); */
9069 } 9075 }
9070 else 9076 else
9071 x_lower_frame (f); 9077 x_lower_frame (f);
@@ -10512,8 +10518,8 @@ x_query_font (f, fontname)
10512 10518
10513 for (i = 0; i < dpyinfo->n_fonts; i++) 10519 for (i = 0; i < dpyinfo->n_fonts; i++)
10514 if (dpyinfo->font_table[i].name 10520 if (dpyinfo->font_table[i].name
10515 && (!strcasecmp (dpyinfo->font_table[i].name, fontname) 10521 && (!xstricmp (dpyinfo->font_table[i].name, fontname)
10516 || !strcasecmp (dpyinfo->font_table[i].full_name, fontname))) 10522 || !xstricmp (dpyinfo->font_table[i].full_name, fontname)))
10517 return (dpyinfo->font_table + i); 10523 return (dpyinfo->font_table + i);
10518 return NULL; 10524 return NULL;
10519} 10525}
@@ -11601,7 +11607,7 @@ syms_of_xterm ()
11601 DEFVAR_BOOL ("x-use-underline-position-properties", 11607 DEFVAR_BOOL ("x-use-underline-position-properties",
11602 &x_use_underline_position_properties, 11608 &x_use_underline_position_properties,
11603 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. 11609 doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties.
11604nil means ignore them. If you encounter fonts with bogus 11610A value of nil means ignore them. If you encounter fonts with bogus
11605UNDERLINE_POSITION font properties, for example 7x13 on XFree prior 11611UNDERLINE_POSITION font properties, for example 7x13 on XFree prior
11606to 4.1, set this to nil. */); 11612to 4.1, set this to nil. */);
11607 x_use_underline_position_properties = 1; 11613 x_use_underline_position_properties = 1;
@@ -11609,9 +11615,9 @@ to 4.1, set this to nil. */);
11609 DEFVAR_BOOL ("x-underline-at-descent-line", 11615 DEFVAR_BOOL ("x-underline-at-descent-line",
11610 &x_underline_at_descent_line, 11616 &x_underline_at_descent_line,
11611 doc: /* *Non-nil means to draw the underline at the same place as the descent line. 11617 doc: /* *Non-nil means to draw the underline at the same place as the descent line.
11612nil means to draw the underline according to the value of the variable 11618A value of nil means to draw the underline according to the value of the
11613`x-use-underline-position-properties', which is usually at the baseline 11619variable `x-use-underline-position-properties', which is usually at the
11614level. The default value is nil. */); 11620baseline level. The default value is nil. */);
11615 x_underline_at_descent_line = 0; 11621 x_underline_at_descent_line = 0;
11616 11622
11617 DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", 11623 DEFVAR_BOOL ("x-mouse-click-focus-ignore-position",