aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2006-04-01 13:24:42 +0000
committerKaroly Lorentey2006-04-01 13:24:42 +0000
commit10a0e6fe87378d0dafb5ce257aa60c8a1b25c708 (patch)
treedb6f6272d381d3ca09c783cea7f5f3aaf8fafc99 /src
parent6bcc8ec7eb185314e1b24f285fdcc1e7093c1bc1 (diff)
parentafc749959d78f5b48b92de877067828d46c915ce (diff)
downloademacs-10a0e6fe87378d0dafb5ce257aa60c8a1b25c708.tar.gz
emacs-10a0e6fe87378d0dafb5ce257aa60c8a1b25c708.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-173 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-174 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-175 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-176 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-177 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-178 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-179 Update from erc--emacs--0 * emacs@sv.gnu.org/emacs--devo--0--patch-180 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-181 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-182 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-183 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-184 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-185 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-186 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-187 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/gnus--rel--5.10--patch-65 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-66 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-67 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-68 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-69 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-70 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-71 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-72 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-542
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit18
-rw-r--r--src/ChangeLog84
-rw-r--r--src/editfns.c32
-rw-r--r--src/fns.c6
-rw-r--r--src/keyboard.c19
-rw-r--r--src/macmenu.c117
-rw-r--r--src/macterm.c3
-rw-r--r--src/print.c12
-rw-r--r--src/process.c74
-rw-r--r--src/term.c6
-rw-r--r--src/w32term.c6
-rw-r--r--src/xdisp.c12
-rw-r--r--src/xfns.c1
-rw-r--r--src/xterm.c5
14 files changed, 262 insertions, 133 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index 2dada424454..d40286f8679 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -58,8 +58,14 @@ define xgettype
58end 58end
59 59
60# Set up something to print out s-expressions. 60# Set up something to print out s-expressions.
61# We save and restore print_output_debug_flag to prevent the w32 port
62# from calling OutputDebugString, which causes GDB to display each
63# character twice (yuk!).
61define pr 64define pr
65 set $output_debug = print_output_debug_flag
66 set print_output_debug_flag = 0
62 set debug_print ($) 67 set debug_print ($)
68 set print_output_debug_flag = $output_debug
63end 69end
64document pr 70document pr
65Print the emacs s-expression which is $. 71Print the emacs s-expression which is $.
@@ -69,7 +75,10 @@ end
69# Print out s-expressions 75# Print out s-expressions
70define pp 76define pp
71 set $tmp = $arg0 77 set $tmp = $arg0
78 set $output_debug = print_output_debug_flag
79 set print_output_debug_flag = 0
72 set safe_debug_print ($tmp) 80 set safe_debug_print ($tmp)
81 set print_output_debug_flag = $output_debug
73end 82end
74document pp 83document pp
75Print the argument as an emacs s-expression 84Print the argument as an emacs s-expression
@@ -81,7 +90,10 @@ define pp1
81 set $tmp = $arg0 90 set $tmp = $arg0
82 echo $arg0 91 echo $arg0
83 printf " = " 92 printf " = "
93 set $output_debug = print_output_debug_flag
94 set print_output_debug_flag = 0
84 set safe_debug_print ($tmp) 95 set safe_debug_print ($tmp)
96 set print_output_debug_flag = $output_debug
85end 97end
86document pp1 98document pp1
87Print the argument as an emacs s-expression 99Print the argument as an emacs s-expression
@@ -94,7 +106,10 @@ end
94# Print value of lisp variable 106# Print value of lisp variable
95define pv 107define pv
96 set $tmp = "$arg0" 108 set $tmp = "$arg0"
109 set $output_debug = print_output_debug_flag
110 set print_output_debug_flag = 0
97 set safe_debug_print ( find_symbol_value (intern ($tmp))) 111 set safe_debug_print ( find_symbol_value (intern ($tmp)))
112 set print_output_debug_flag = $output_debug
98end 113end
99document pv 114document pv
100Print the value of the lisp variable given as argument. 115Print the value of the lisp variable given as argument.
@@ -106,7 +121,10 @@ define pv1
106 set $tmp = "$arg0" 121 set $tmp = "$arg0"
107 echo $arg0 122 echo $arg0
108 printf " = " 123 printf " = "
124 set $output_debug = print_output_debug_flag
125 set print_output_debug_flag = 0
109 set safe_debug_print (find_symbol_value (intern ($tmp))) 126 set safe_debug_print (find_symbol_value (intern ($tmp)))
127 set print_output_debug_flag = $output_debug
110end 128end
111document pv1 129document pv1
112Print the value of the lisp variable given as argument. 130Print the value of the lisp variable given as argument.
diff --git a/src/ChangeLog b/src/ChangeLog
index 867306579ab..ba816a9e2f0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,7 +1,81 @@
12006-03-31 Kenichi Handa <handa@m17n.org>
2
3 * xfns.c (xg_set_icon): Delete superfluous UNGCPRO.
4
52006-03-30 Dan Nicolaescu <dann@ics.uci.edu>
6
7 * xdisp.c (syms_of_xdisp): Fix variable name.
8
92006-03-30 Kenichi Handa <handa@m17n.org>
10
11 * xterm.c (x_term_init): Delete superfluous UNGCPRO.
12
132006-03-29 Juanma Barranquero <lekktu@gmail.com>
14
15 * keyboard.c (process_tool_bar_item): Reorder dummy args.
16
172006-03-29 Stefan Monnier <monnier@iro.umontreal.ca>
18
19 * keyboard.c (tool_bar_items): Use map_keymap.
20 (process_tool_bar_item): Add dummy args to fit the required interface.
21
222006-03-25 Eli Zaretskii <eliz@gnu.org>
23
24 * .gdbinit (pr, pp, pp1, pv, pv1): Force print_output_debug_flag
25 to zero before calling debug_print or safe_debug_print.
26
27 * print.c (print_output_debug_flag): New global variable.
28 (Fexternal_debugging_output) [WINDOWSNT]: Don't call
29 OutputDebugString if print_output_debug_flag is zero.
30
312006-03-24 Paul Eggert <eggert@cs.ucla.edu>
32
33 * editfns.c (TM_YEAR_BASE): Move up, so the changes below can use it.
34 (Fdecode_time, Fencode_time): Use TM_YEAR_BASE instead of 1900.
35 (Fdecode_time): Cast tm_year to EMACS_INT.
36 (Fcurrent_time_string): Report an invalid time specification if
37 the argument is invalid. Also, check for out-of-range time stamps.
38
392006-03-24 Kim F. Storm <storm@cua.dk>
40
41 * xterm.c (handle_one_xevent):
42 * w32term.c (w32_read_socket):
43 * macterm.c (XTread_socket): Don't let key-press clear mouse face
44 on in toolbar window if mouse-highlight is an integer.
45
46 * fns.c (sxhash_list): Include last non-nil CDR in hash.
47
482006-03-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
49
50 * macmenu.c (enum mac_menu_kind): New enum.
51 (min_menu_id): New variable.
52 (POPUP_SUBMENU_ID, MIN_POPUP_SUBMENU_ID, MIN_MENU_ID)
53 (MIN_SUBMENU_ID): Remove defines. All uses are replaced with
54 min_menu_id and enumerators in enum mac_menu_kind.
55 (fill_menu, dispose_menus, install_menu_quit_handler): New arg KIND.
56 All uses changed. Add range check for menu ID.
57 (fill_menubar): Add range check for menu ID.
58 [HAVE_CANCELMENUTRACKING] (menu_quit_handler): Check error code of
59 GetEventParameter.
60 (set_frame_menubar, mac_menu_show): Call install_menu_quit_handler
61 for each menu kind.
62
632006-03-22 Kim F. Storm <storm@cua.dk>
64
65 * xdisp.c: Undo 2006-03-21 change.
66
67 * term.c: Define aliases for append_glyph and produce_stretch_glyph
68 when `static' is defined to avoid name clash with those in xdisp.c.
69
70 * process.c (Faccept_process_output): Fix to comply with lisp reference.
71 Change arg "timeout" to "seconds" and allow both integer and float value.
72 Change arg "timeout-msec" to "millisec" and interpret" as milliseconds
73 rather than microseconds. Fix doc string accordingly.
74
12006-03-21 Ken Raeburn <raeburn@raeburn.org> 752006-03-21 Ken Raeburn <raeburn@raeburn.org>
2 76
3 * xdisp.c (store_next_glyph): Renamed from append_glyph. 77 * xdisp.c (store_next_glyph): Rename from append_glyph.
4 (generate_stretch_glyph): Renamed from produce_stretch_glyph. 78 (generate_stretch_glyph): Rename from produce_stretch_glyph.
5 All callers changed accordingly. 79 All callers changed accordingly.
6 80
72006-03-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 812006-03-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
@@ -842,8 +916,8 @@
842 916
843 * editfns.c (Fconstrain_to_field): Fix behaviour on field boundaries. 917 * editfns.c (Fconstrain_to_field): Fix behaviour on field boundaries.
844 (find_field): Set before_field to after_field when pos is at BEGV. 918 (find_field): Set before_field to after_field when pos is at BEGV.
845 (Fline_beginning_position, Fline_end_position): Clarify 919 (Fline_beginning_position, Fline_end_position):
846 confusing doc string. 920 Clarify confusing doc string.
847 921
848 * cmds.c (Fbeginning_of_line, Fend_of_line): Clarify confusing doc 922 * cmds.c (Fbeginning_of_line, Fend_of_line): Clarify confusing doc
849 string. 923 string.
@@ -1772,7 +1846,7 @@
17722005-11-11 David Reitter <david.reitter@gmail.com> 18462005-11-11 David Reitter <david.reitter@gmail.com>
1773 1847
1774 * macterm.c (syms_of_macterm): Remove macCtrlKey, macShiftKey, 1848 * macterm.c (syms_of_macterm): Remove macCtrlKey, macShiftKey,
1775 macMetaKey, macAltKey. Introduce Qctrl, Qmeta, 1849 macMetaKey, macAltKey. Introduce Qctrl, Qmeta,
1776 Vmac_control_modifier / mac-control-modifier, 1850 Vmac_control_modifier / mac-control-modifier,
1777 Vmac_option_modifier / mac-option-modifier, 1851 Vmac_option_modifier / mac-option-modifier,
1778 Vmac_command_modifier / mac-command-modifier. 1852 Vmac_command_modifier / mac-command-modifier.
diff --git a/src/editfns.c b/src/editfns.c
index b621397eda3..888bbe3062b 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -72,6 +72,8 @@ Boston, MA 02110-1301, USA. */
72extern char **environ; 72extern char **environ;
73#endif 73#endif
74 74
75#define TM_YEAR_BASE 1900
76
75extern size_t emacs_strftimeu P_ ((char *, size_t, const char *, 77extern size_t emacs_strftimeu P_ ((char *, size_t, const char *,
76 const struct tm *, int)); 78 const struct tm *, int));
77static int tm_diff P_ ((struct tm *, struct tm *)); 79static int tm_diff P_ ((struct tm *, struct tm *));
@@ -721,7 +723,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
721 int orig_point = 0; 723 int orig_point = 0;
722 int fwd; 724 int fwd;
723 Lisp_Object prev_old, prev_new; 725 Lisp_Object prev_old, prev_new;
724 726
725 if (NILP (new_pos)) 727 if (NILP (new_pos))
726 /* Use the current point, and afterwards, set it. */ 728 /* Use the current point, and afterwards, set it. */
727 { 729 {
@@ -736,7 +738,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
736 738
737 prev_old = make_number (XFASTINT (old_pos) - 1); 739 prev_old = make_number (XFASTINT (old_pos) - 1);
738 prev_new = make_number (XFASTINT (new_pos) - 1); 740 prev_new = make_number (XFASTINT (new_pos) - 1);
739 741
740 if (NILP (Vinhibit_field_text_motion) 742 if (NILP (Vinhibit_field_text_motion)
741 && !EQ (new_pos, old_pos) 743 && !EQ (new_pos, old_pos)
742 && (!NILP (Fget_char_property (new_pos, Qfield, Qnil)) 744 && (!NILP (Fget_char_property (new_pos, Qfield, Qnil))
@@ -1722,7 +1724,9 @@ DOW and ZONE.) */)
1722 XSETFASTINT (list_args[2], decoded_time->tm_hour); 1724 XSETFASTINT (list_args[2], decoded_time->tm_hour);
1723 XSETFASTINT (list_args[3], decoded_time->tm_mday); 1725 XSETFASTINT (list_args[3], decoded_time->tm_mday);
1724 XSETFASTINT (list_args[4], decoded_time->tm_mon + 1); 1726 XSETFASTINT (list_args[4], decoded_time->tm_mon + 1);
1725 XSETINT (list_args[5], decoded_time->tm_year + 1900); 1727 /* On 64-bit machines an int is narrower than EMACS_INT, thus the
1728 cast below avoids overflow in int arithmetics. */
1729 XSETINT (list_args[5], TM_YEAR_BASE + (EMACS_INT) decoded_time->tm_year);
1726 XSETFASTINT (list_args[6], decoded_time->tm_wday); 1730 XSETFASTINT (list_args[6], decoded_time->tm_wday);
1727 list_args[7] = (decoded_time->tm_isdst)? Qt : Qnil; 1731 list_args[7] = (decoded_time->tm_isdst)? Qt : Qnil;
1728 1732
@@ -1778,7 +1782,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
1778 tm.tm_hour = XINT (args[2]); 1782 tm.tm_hour = XINT (args[2]);
1779 tm.tm_mday = XINT (args[3]); 1783 tm.tm_mday = XINT (args[3]);
1780 tm.tm_mon = XINT (args[4]) - 1; 1784 tm.tm_mon = XINT (args[4]) - 1;
1781 tm.tm_year = XINT (args[5]) - 1900; 1785 tm.tm_year = XINT (args[5]) - TM_YEAR_BASE;
1782 tm.tm_isdst = -1; 1786 tm.tm_isdst = -1;
1783 1787
1784 if (CONSP (zone)) 1788 if (CONSP (zone))
@@ -1844,11 +1848,25 @@ but this is considered obsolete. */)
1844{ 1848{
1845 time_t value; 1849 time_t value;
1846 char buf[30]; 1850 char buf[30];
1851 struct tm *tm;
1847 register char *tem; 1852 register char *tem;
1848 1853
1849 if (! lisp_time_argument (specified_time, &value, NULL)) 1854 if (! lisp_time_argument (specified_time, &value, NULL))
1850 value = -1; 1855 error ("Invalid time specification");
1851 tem = (char *) ctime (&value); 1856 /* Do not use ctime, since it has undefined behavior with
1857 out-of-range time stamps. This avoids a core dump triggered by
1858 (current-time-string '(2814749767106 0)) on 64-bit Solaris 8. See
1859 <http://www.opengroup.org/austin/mailarchives/ag/msg09294.html>
1860 for more details about this portability problem. */
1861 tm = localtime (&value);
1862 /* Checking for out-of-range time stamps avoids buffer overruns that
1863 cause core dump on some systems (e.g., 64-bit Solaris), and also
1864 preserves the historic behavior of always returning a fixed-size
1865 24-character string. */
1866 if (! (tm && -999 - TM_YEAR_BASE <= tm->tm_year
1867 && tm->tm_year <= 9999 - TM_YEAR_BASE))
1868 error ("Specified time is not representable");
1869 tem = asctime (tm);
1852 1870
1853 strncpy (buf, tem, 24); 1871 strncpy (buf, tem, 24);
1854 buf[24] = 0; 1872 buf[24] = 0;
@@ -1856,8 +1874,6 @@ but this is considered obsolete. */)
1856 return build_string (buf); 1874 return build_string (buf);
1857} 1875}
1858 1876
1859#define TM_YEAR_BASE 1900
1860
1861/* Yield A - B, measured in seconds. 1877/* Yield A - B, measured in seconds.
1862 This function is copied from the GNU C Library. */ 1878 This function is copied from the GNU C Library. */
1863static int 1879static int
diff --git a/src/fns.c b/src/fns.c
index d16222e6fa5..0608fee2df6 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -5119,6 +5119,12 @@ sxhash_list (list, depth)
5119 hash = SXHASH_COMBINE (hash, hash2); 5119 hash = SXHASH_COMBINE (hash, hash2);
5120 } 5120 }
5121 5121
5122 if (!NILP (list))
5123 {
5124 unsigned hash2 = sxhash (list, depth + 1);
5125 hash = SXHASH_COMBINE (hash, hash2);
5126 }
5127
5122 return hash; 5128 return hash;
5123} 5129}
5124 5130
diff --git a/src/keyboard.c b/src/keyboard.c
index bcfc9449dae..dff14877103 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7763,7 +7763,7 @@ Lisp_Object QCimage;
7763/* Function prototypes. */ 7763/* Function prototypes. */
7764 7764
7765static void init_tool_bar_items P_ ((Lisp_Object)); 7765static void init_tool_bar_items P_ ((Lisp_Object));
7766static void process_tool_bar_item P_ ((Lisp_Object, Lisp_Object)); 7766static void process_tool_bar_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object, void*));
7767static int parse_tool_bar_item P_ ((Lisp_Object, Lisp_Object)); 7767static int parse_tool_bar_item P_ ((Lisp_Object, Lisp_Object));
7768static void append_tool_bar_item P_ ((void)); 7768static void append_tool_bar_item P_ ((void));
7769 7769
@@ -7841,17 +7841,7 @@ tool_bar_items (reuse, nitems)
7841 7841
7842 keymap = get_keymap (access_keymap (maps[i], Qtool_bar, 1, 0, 1), 0, 1); 7842 keymap = get_keymap (access_keymap (maps[i], Qtool_bar, 1, 0, 1), 0, 1);
7843 if (CONSP (keymap)) 7843 if (CONSP (keymap))
7844 { 7844 map_keymap (keymap, process_tool_bar_item, Qnil, NULL, 1);
7845 Lisp_Object tail;
7846
7847 /* KEYMAP is a list `(keymap (KEY . BINDING) ...)'. */
7848 for (tail = keymap; CONSP (tail); tail = XCDR (tail))
7849 {
7850 Lisp_Object keydef = XCAR (tail);
7851 if (CONSP (keydef))
7852 process_tool_bar_item (XCAR (keydef), XCDR (keydef));
7853 }
7854 }
7855 } 7845 }
7856 7846
7857 Vinhibit_quit = oquit; 7847 Vinhibit_quit = oquit;
@@ -7863,8 +7853,9 @@ tool_bar_items (reuse, nitems)
7863/* Process the definition of KEY which is DEF. */ 7853/* Process the definition of KEY which is DEF. */
7864 7854
7865static void 7855static void
7866process_tool_bar_item (key, def) 7856process_tool_bar_item (key, def, data, args)
7867 Lisp_Object key, def; 7857 Lisp_Object key, def, data;
7858 void *args;
7868{ 7859{
7869 int i; 7860 int i;
7870 extern Lisp_Object Qundefined; 7861 extern Lisp_Object Qundefined;
diff --git a/src/macmenu.c b/src/macmenu.c
index 8cce41114de..8610ecafd94 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -62,10 +62,17 @@ Boston, MA 02110-1301, USA. */
62 62
63#include "dispextern.h" 63#include "dispextern.h"
64 64
65#define POPUP_SUBMENU_ID 235 65enum mac_menu_kind { /* Menu ID range */
66#define MIN_POPUP_SUBMENU_ID 512 66 MAC_MENU_APPLE, /* 0 (Reserved by Apple) */
67#define MIN_MENU_ID 256 67 MAC_MENU_MENU_BAR, /* 1 .. 234 */
68#define MIN_SUBMENU_ID 1 68 MAC_MENU_POPUP, /* 235 */
69 MAC_MENU_DRIVER, /* 236 .. 255 (Reserved) */
70 MAC_MENU_MENU_BAR_SUB, /* 256 .. 16383 */
71 MAC_MENU_POPUP_SUB, /* 16384 .. 32767 */
72 MAC_MENU_END /* 32768 */
73};
74
75static const min_menu_id[] = {0, 1, 235, 236, 256, 16384, 32768};
69 76
70#define DIALOG_WINDOW_RESOURCE 130 77#define DIALOG_WINDOW_RESOURCE 130
71 78
@@ -189,9 +196,9 @@ static void single_keymap_panes P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
189static void list_of_panes P_ ((Lisp_Object)); 196static void list_of_panes P_ ((Lisp_Object));
190static void list_of_items P_ ((Lisp_Object)); 197static void list_of_items P_ ((Lisp_Object));
191 198
192static int fill_menu P_ ((MenuHandle, widget_value *, int)); 199static int fill_menu P_ ((MenuHandle, widget_value *, enum mac_menu_kind, int));
193static void fill_menubar P_ ((widget_value *, int)); 200static void fill_menubar P_ ((widget_value *, int));
194static void dispose_menus P_ ((int)); 201static void dispose_menus P_ ((enum mac_menu_kind, int));
195 202
196 203
197/* This holds a Lisp vector that holds the results of decoding 204/* This holds a Lisp vector that holds the results of decoding
@@ -1387,19 +1394,21 @@ menu_quit_handler (nextHandler, theEvent, userData)
1387 EventRef theEvent; 1394 EventRef theEvent;
1388 void* userData; 1395 void* userData;
1389{ 1396{
1397 OSStatus err;
1390 UInt32 keyCode; 1398 UInt32 keyCode;
1391 UInt32 keyModifiers; 1399 UInt32 keyModifiers;
1392 extern int mac_quit_char_modifiers; 1400 extern int mac_quit_char_modifiers;
1393 extern int mac_quit_char_keycode; 1401 extern int mac_quit_char_keycode;
1394 1402
1395 GetEventParameter (theEvent, kEventParamKeyCode, 1403 err = GetEventParameter (theEvent, kEventParamKeyCode,
1396 typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode); 1404 typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode);
1397 1405
1398 GetEventParameter (theEvent, kEventParamKeyModifiers, 1406 if (err == noErr)
1399 typeUInt32, NULL, sizeof(UInt32), 1407 err = GetEventParameter (theEvent, kEventParamKeyModifiers,
1400 NULL, &keyModifiers); 1408 typeUInt32, NULL, sizeof(UInt32),
1409 NULL, &keyModifiers);
1401 1410
1402 if (keyCode == mac_quit_char_keycode 1411 if (err == noErr && keyCode == mac_quit_char_keycode
1403 && keyModifiers == mac_quit_char_modifiers) 1412 && keyModifiers == mac_quit_char_modifiers)
1404 { 1413 {
1405 MenuRef menu = userData != 0 1414 MenuRef menu = userData != 0
@@ -1414,35 +1423,29 @@ menu_quit_handler (nextHandler, theEvent, userData)
1414} 1423}
1415#endif /* HAVE_CANCELMENUTRACKING */ 1424#endif /* HAVE_CANCELMENUTRACKING */
1416 1425
1417/* Add event handler for MENU_HANDLE so we can detect C-g. 1426/* Add event handler to all menus that belong to KIND so we can detect C-g.
1418 If MENU_HANDLE is NULL, install handler for all menus in the menu bar. 1427 MENU_HANDLE is the root menu of the tracking session to dismiss
1428 when C-g is detected. NULL means the menu bar.
1419 If CancelMenuTracking isn't available, do nothing. */ 1429 If CancelMenuTracking isn't available, do nothing. */
1420 1430
1421static void 1431static void
1422install_menu_quit_handler (MenuHandle menu_handle) 1432install_menu_quit_handler (kind, menu_handle)
1433 enum mac_menu_kind kind;
1434 MenuHandle menu_handle;
1423{ 1435{
1424#ifdef HAVE_CANCELMENUTRACKING 1436#ifdef HAVE_CANCELMENUTRACKING
1425 EventTypeSpec typesList[] = { { kEventClassKeyboard, kEventRawKeyDown } }; 1437 EventTypeSpec typesList[] = { { kEventClassKeyboard, kEventRawKeyDown } };
1426 int i = MIN_MENU_ID; 1438 int id;
1427 MenuHandle menu = menu_handle ? menu_handle : GetMenuHandle (i);
1428 1439
1429 while (menu != NULL) 1440 for (id = min_menu_id[kind]; id < min_menu_id[kind + 1]; id++)
1430 { 1441 {
1431 InstallMenuEventHandler (menu, menu_quit_handler, 1442 MenuHandle menu = GetMenuHandle (id);
1432 GetEventTypeCount (typesList),
1433 typesList, menu_handle, NULL);
1434 if (menu_handle) break;
1435 menu = GetMenuHandle (++i);
1436 }
1437 1443
1438 i = menu_handle ? MIN_POPUP_SUBMENU_ID : MIN_SUBMENU_ID; 1444 if (menu == NULL)
1439 menu = GetMenuHandle (i); 1445 break;
1440 while (menu != NULL)
1441 {
1442 InstallMenuEventHandler (menu, menu_quit_handler, 1446 InstallMenuEventHandler (menu, menu_quit_handler,
1443 GetEventTypeCount (typesList), 1447 GetEventTypeCount (typesList),
1444 typesList, menu_handle, NULL); 1448 typesList, menu_handle, NULL);
1445 menu = GetMenuHandle (++i);
1446 } 1449 }
1447#endif /* HAVE_CANCELMENUTRACKING */ 1450#endif /* HAVE_CANCELMENUTRACKING */
1448} 1451}
@@ -1677,7 +1680,8 @@ set_frame_menubar (f, first_time, deep_p)
1677 fill_menubar (first_wv->contents, deep_p); 1680 fill_menubar (first_wv->contents, deep_p);
1678 1681
1679 /* Add event handler so we can detect C-g. */ 1682 /* Add event handler so we can detect C-g. */
1680 install_menu_quit_handler (NULL); 1683 install_menu_quit_handler (MAC_MENU_MENU_BAR, NULL);
1684 install_menu_quit_handler (MAC_MENU_MENU_BAR_SUB, NULL);
1681 free_menubar_widget_value_tree (first_wv); 1685 free_menubar_widget_value_tree (first_wv);
1682 1686
1683 UNBLOCK_INPUT; 1687 UNBLOCK_INPUT;
@@ -1700,7 +1704,7 @@ pop_down_menu (arg)
1700{ 1704{
1701 struct Lisp_Save_Value *p = XSAVE_VALUE (arg); 1705 struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
1702 FRAME_PTR f = p->pointer; 1706 FRAME_PTR f = p->pointer;
1703 MenuHandle menu = GetMenuHandle (POPUP_SUBMENU_ID); 1707 MenuHandle menu = GetMenuHandle (min_menu_id[MAC_MENU_POPUP]);
1704 1708
1705 BLOCK_INPUT; 1709 BLOCK_INPUT;
1706 1710
@@ -1709,8 +1713,8 @@ pop_down_menu (arg)
1709 FRAME_MAC_DISPLAY_INFO (f)->grabbed = 0; 1713 FRAME_MAC_DISPLAY_INFO (f)->grabbed = 0;
1710 1714
1711 /* delete all menus */ 1715 /* delete all menus */
1712 dispose_menus (MIN_POPUP_SUBMENU_ID); 1716 dispose_menus (MAC_MENU_POPUP_SUB, 0);
1713 DeleteMenu (POPUP_SUBMENU_ID); 1717 DeleteMenu (min_menu_id[MAC_MENU_POPUP]);
1714 DisposeMenu (menu); 1718 DisposeMenu (menu);
1715 1719
1716 UNBLOCK_INPUT; 1720 UNBLOCK_INPUT;
@@ -1944,9 +1948,10 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1944 } 1948 }
1945 1949
1946 /* Actually create the menu. */ 1950 /* Actually create the menu. */
1947 menu = NewMenu (POPUP_SUBMENU_ID, "\p"); 1951 menu = NewMenu (min_menu_id[MAC_MENU_POPUP], "\p");
1948 InsertMenu (menu, -1); 1952 InsertMenu (menu, -1);
1949 fill_menu (menu, first_wv->contents, MIN_POPUP_SUBMENU_ID); 1953 fill_menu (menu, first_wv->contents, MAC_MENU_POPUP_SUB,
1954 min_menu_id[MAC_MENU_POPUP_SUB]);
1950 1955
1951 /* Free the widget_value objects we used to specify the 1956 /* Free the widget_value objects we used to specify the
1952 contents. */ 1957 contents. */
@@ -1966,7 +1971,8 @@ mac_menu_show (f, x, y, for_click, keymaps, title, error)
1966 record_unwind_protect (pop_down_menu, make_save_value (f, 0)); 1971 record_unwind_protect (pop_down_menu, make_save_value (f, 0));
1967 1972
1968 /* Add event handler so we can detect C-g. */ 1973 /* Add event handler so we can detect C-g. */
1969 install_menu_quit_handler (menu); 1974 install_menu_quit_handler (MAC_MENU_POPUP, menu);
1975 install_menu_quit_handler (MAC_MENU_POPUP_SUB, menu);
1970 1976
1971 /* Display the menu. */ 1977 /* Display the menu. */
1972 menu_item_choice = PopUpMenuSelect (menu, pos.v, pos.h, 0); 1978 menu_item_choice = PopUpMenuSelect (menu, pos.v, pos.h, 0);
@@ -2437,9 +2443,10 @@ add_menu_item (menu, pos, wv)
2437/* Construct native Mac OS menu based on widget_value tree. */ 2443/* Construct native Mac OS menu based on widget_value tree. */
2438 2444
2439static int 2445static int
2440fill_menu (menu, wv, submenu_id) 2446fill_menu (menu, wv, kind, submenu_id)
2441 MenuHandle menu; 2447 MenuHandle menu;
2442 widget_value *wv; 2448 widget_value *wv;
2449 enum mac_menu_kind kind;
2443 int submenu_id; 2450 int submenu_id;
2444{ 2451{
2445 int pos; 2452 int pos;
@@ -2447,13 +2454,13 @@ fill_menu (menu, wv, submenu_id)
2447 for (pos = 1; wv != NULL; wv = wv->next, pos++) 2454 for (pos = 1; wv != NULL; wv = wv->next, pos++)
2448 { 2455 {
2449 add_menu_item (menu, pos, wv); 2456 add_menu_item (menu, pos, wv);
2450 if (wv->contents) 2457 if (wv->contents && submenu_id < min_menu_id[kind + 1])
2451 { 2458 {
2452 MenuHandle submenu = NewMenu (submenu_id, "\pX"); 2459 MenuHandle submenu = NewMenu (submenu_id, "\pX");
2453 2460
2454 InsertMenu (submenu, -1); 2461 InsertMenu (submenu, -1);
2455 SetMenuItemHierarchicalID (menu, pos, submenu_id); 2462 SetMenuItemHierarchicalID (menu, pos, submenu_id);
2456 submenu_id = fill_menu (submenu, wv->contents, submenu_id + 1); 2463 submenu_id = fill_menu (submenu, wv->contents, kind, submenu_id + 1);
2457 } 2464 }
2458 } 2465 }
2459 2466
@@ -2477,8 +2484,8 @@ fill_menubar (wv, deep_p)
2477 /* Clean up the menu bar when filled by the entire menu trees. */ 2484 /* Clean up the menu bar when filled by the entire menu trees. */
2478 if (deep_p) 2485 if (deep_p)
2479 { 2486 {
2480 dispose_menus (MIN_MENU_ID); 2487 dispose_menus (MAC_MENU_MENU_BAR, 0);
2481 dispose_menus (MIN_SUBMENU_ID); 2488 dispose_menus (MAC_MENU_MENU_BAR_SUB, 0);
2482#if !TARGET_API_MAC_CARBON 2489#if !TARGET_API_MAC_CARBON
2483 title_changed_p = 1; 2490 title_changed_p = 1;
2484#endif 2491#endif
@@ -2486,8 +2493,10 @@ fill_menubar (wv, deep_p)
2486 2493
2487 /* Fill menu bar titles and submenus. Reuse the existing menu bar 2494 /* Fill menu bar titles and submenus. Reuse the existing menu bar
2488 titles as much as possible to minimize redraw (if !deep_p). */ 2495 titles as much as possible to minimize redraw (if !deep_p). */
2489 submenu_id = MIN_SUBMENU_ID; 2496 submenu_id = min_menu_id[MAC_MENU_MENU_BAR_SUB];
2490 for (id = MIN_MENU_ID; wv != NULL; wv = wv->next, id++) 2497 for (id = min_menu_id[MAC_MENU_MENU_BAR];
2498 wv != NULL && id < min_menu_id[MAC_MENU_MENU_BAR + 1];
2499 wv = wv->next, id++)
2491 { 2500 {
2492 strncpy (title, wv->name, 255); 2501 strncpy (title, wv->name, 255);
2493 title[255] = '\0'; 2502 title[255] = '\0';
@@ -2523,12 +2532,13 @@ fill_menubar (wv, deep_p)
2523 } 2532 }
2524 2533
2525 if (wv->contents) 2534 if (wv->contents)
2526 submenu_id = fill_menu (menu, wv->contents, submenu_id); 2535 submenu_id = fill_menu (menu, wv->contents, MAC_MENU_MENU_BAR_SUB,
2536 submenu_id);
2527 } 2537 }
2528 2538
2529 if (GetMenuHandle (id)) 2539 if (id < min_menu_id[MAC_MENU_MENU_BAR + 1] && GetMenuHandle (id))
2530 { 2540 {
2531 dispose_menus (id); 2541 dispose_menus (MAC_MENU_MENU_BAR, id);
2532#if !TARGET_API_MAC_CARBON 2542#if !TARGET_API_MAC_CARBON
2533 title_changed_p = 1; 2543 title_changed_p = 1;
2534#endif 2544#endif
@@ -2540,17 +2550,22 @@ fill_menubar (wv, deep_p)
2540#endif 2550#endif
2541} 2551}
2542 2552
2553/* Dispose of menus that belong to KIND, and remove them from the menu
2554 list. ID is the lower bound of menu IDs that will be processed. */
2555
2543static void 2556static void
2544dispose_menus (id) 2557dispose_menus (kind, id)
2558 enum mac_menu_kind kind;
2545 int id; 2559 int id;
2546{ 2560{
2547 MenuHandle menu; 2561 for (id = max (id, min_menu_id[kind]); id < min_menu_id[kind + 1]; id++)
2548
2549 while ((menu = GetMenuHandle (id)) != NULL)
2550 { 2562 {
2563 MenuHandle menu = GetMenuHandle (id);
2564
2565 if (menu == NULL)
2566 break;
2551 DeleteMenu (id); 2567 DeleteMenu (id);
2552 DisposeMenu (menu); 2568 DisposeMenu (menu);
2553 id++;
2554 } 2569 }
2555} 2570}
2556 2571
diff --git a/src/macterm.c b/src/macterm.c
index a51304f21da..77558eb320d 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -10455,7 +10455,8 @@ XTread_socket (sd, expected, hold_quit)
10455 10455
10456 ObscureCursor (); 10456 ObscureCursor ();
10457 10457
10458 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) 10458 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
10459 && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window))
10459 { 10460 {
10460 clear_mouse_face (dpyinfo); 10461 clear_mouse_face (dpyinfo);
10461 dpyinfo->mouse_face_hidden = 1; 10462 dpyinfo->mouse_face_hidden = 1;
diff --git a/src/print.c b/src/print.c
index 28e9e86177e..7e9ed30c32b 100644
--- a/src/print.c
+++ b/src/print.c
@@ -182,6 +182,9 @@ static int max_print;
182 182
183void print_interval (); 183void print_interval ();
184 184
185/* GDB resets this to zero on W32 to disable OutputDebugString calls. */
186int print_output_debug_flag = 1;
187
185 188
186/* Low level output routines for characters and strings */ 189/* Low level output routines for characters and strings */
187 190
@@ -909,10 +912,11 @@ to make it write to the debugging output. */)
909 912
910#ifdef WINDOWSNT 913#ifdef WINDOWSNT
911 /* Send the output to a debugger (nothing happens if there isn't one). */ 914 /* Send the output to a debugger (nothing happens if there isn't one). */
912 { 915 if (print_output_debug_flag)
913 char buf[2] = {(char) XINT (character), '\0'}; 916 {
914 OutputDebugString (buf); 917 char buf[2] = {(char) XINT (character), '\0'};
915 } 918 OutputDebugString (buf);
919 }
916#endif 920#endif
917 921
918 return character; 922 return character;
diff --git a/src/process.c b/src/process.c
index a82932ba57b..e3fa187565f 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3843,62 +3843,60 @@ DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output,
3843It is read into the process' buffers or given to their filter functions. 3843It is read into the process' buffers or given to their filter functions.
3844Non-nil arg PROCESS means do not return until some output has been received 3844Non-nil arg PROCESS means do not return until some output has been received
3845from PROCESS. 3845from PROCESS.
3846Non-nil second arg TIMEOUT and third arg TIMEOUT-MSECS are number of 3846
3847seconds and microseconds to wait; return after that much time whether 3847Non-nil second arg SECONDS and third arg MILLISEC are number of
3848or not there is input. 3848seconds and milliseconds to wait; return after that much time whether
3849or not there is input. If SECONDS is a floating point number,
3850it specifies a fractional number of seconds to wait.
3851
3849If optional fourth arg JUST-THIS-ONE is non-nil, only accept output 3852If optional fourth arg JUST-THIS-ONE is non-nil, only accept output
3850from PROCESS, suspending reading output from other processes. 3853from PROCESS, suspending reading output from other processes.
3851If JUST-THIS-ONE is an integer, don't run any timers either. 3854If JUST-THIS-ONE is an integer, don't run any timers either.
3852Return non-nil iff we received any output before the timeout expired. */) 3855Return non-nil iff we received any output before the timeout expired. */)
3853 (process, timeout, timeout_msecs, just_this_one) 3856 (process, seconds, millisec, just_this_one)
3854 register Lisp_Object process, timeout, timeout_msecs, just_this_one; 3857 register Lisp_Object process, seconds, millisec, just_this_one;
3855{ 3858{
3856 int seconds; 3859 int secs, usecs = 0;
3857 int useconds;
3858 3860
3859 if (! NILP (process)) 3861 if (! NILP (process))
3860 CHECK_PROCESS (process); 3862 CHECK_PROCESS (process);
3861 else 3863 else
3862 just_this_one = Qnil; 3864 just_this_one = Qnil;
3863 3865
3864 if (! NILP (timeout_msecs)) 3866 if (!NILP (seconds))
3865 { 3867 {
3866 CHECK_NUMBER (timeout_msecs); 3868 if (INTEGERP (seconds))
3867 useconds = XINT (timeout_msecs); 3869 secs = XINT (seconds);
3868 if (!INTEGERP (timeout)) 3870 else if (FLOATP (seconds))
3869 XSETINT (timeout, 0); 3871 {
3870 3872 double timeout = XFLOAT_DATA (seconds);
3871 { 3873 secs = (int) timeout;
3872 int carry = useconds / 1000000; 3874 usecs = (int) ((timeout - (double) secs) * 1000000);
3873 3875 }
3874 XSETINT (timeout, XINT (timeout) + carry); 3876 else
3875 useconds -= carry * 1000000; 3877 wrong_type_argument (Qnumberp, seconds);
3876 3878
3877 /* I think this clause is necessary because C doesn't 3879 if (INTEGERP (millisec))
3878 guarantee a particular rounding direction for negative 3880 {
3879 integers. */ 3881 int carry;
3880 if (useconds < 0) 3882 usecs += XINT (millisec) * 1000;
3881 { 3883 carry = usecs / 1000000;
3882 XSETINT (timeout, XINT (timeout) - 1); 3884 secs += carry;
3883 useconds += 1000000; 3885 if ((usecs -= carry * 1000000) < 0)
3884 } 3886 {
3885 } 3887 secs--;
3886 } 3888 usecs += 1000000;
3887 else 3889 }
3888 useconds = 0; 3890 }
3889 3891
3890 if (! NILP (timeout)) 3892 if (secs < 0 || (secs == 0 && usecs == 0))
3891 { 3893 secs = -1, usecs = 0;
3892 CHECK_NUMBER (timeout);
3893 seconds = XINT (timeout);
3894 if (seconds < 0 || (seconds == 0 && useconds == 0))
3895 seconds = -1;
3896 } 3894 }
3897 else 3895 else
3898 seconds = NILP (process) ? -1 : 0; 3896 secs = NILP (process) ? -1 : 0;
3899 3897
3900 return 3898 return
3901 (wait_reading_process_output (seconds, useconds, 0, 0, 3899 (wait_reading_process_output (secs, usecs, 0, 0,
3902 Qnil, 3900 Qnil,
3903 !NILP (process) ? XPROCESS (process) : NULL, 3901 !NILP (process) ? XPROCESS (process) : NULL,
3904 NILP (just_this_one) ? 0 : 3902 NILP (just_this_one) ? 0 :
diff --git a/src/term.c b/src/term.c
index c98c7db2c0d..efa6bc2bcd2 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1322,6 +1322,12 @@ term_get_fkeys_1 ()
1322 Character Display Information 1322 Character Display Information
1323 ***********************************************************************/ 1323 ***********************************************************************/
1324 1324
1325/* Avoid name clash with functions defined in xterm.c */
1326#ifdef static
1327#define append_glyph append_glyph_term
1328#define produce_stretch_glyph produce_stretch_glyph_term
1329#endif
1330
1325static void append_glyph P_ ((struct it *)); 1331static void append_glyph P_ ((struct it *));
1326static void produce_stretch_glyph P_ ((struct it *)); 1332static void produce_stretch_glyph P_ ((struct it *));
1327 1333
diff --git a/src/w32term.c b/src/w32term.c
index d7c9bc8c159..53dae452edc 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -4260,7 +4260,8 @@ w32_read_socket (sd, expected, hold_quit)
4260 4260
4261 if (f && !f->iconified) 4261 if (f && !f->iconified)
4262 { 4262 {
4263 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) 4263 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
4264 && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window))
4264 { 4265 {
4265 clear_mouse_face (dpyinfo); 4266 clear_mouse_face (dpyinfo);
4266 dpyinfo->mouse_face_hidden = 1; 4267 dpyinfo->mouse_face_hidden = 1;
@@ -4283,7 +4284,8 @@ w32_read_socket (sd, expected, hold_quit)
4283 4284
4284 if (f && !f->iconified) 4285 if (f && !f->iconified)
4285 { 4286 {
4286 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) 4287 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
4288 && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window))
4287 { 4289 {
4288 clear_mouse_face (dpyinfo); 4290 clear_mouse_face (dpyinfo);
4289 dpyinfo->mouse_face_hidden = 1; 4291 dpyinfo->mouse_face_hidden = 1;
diff --git a/src/xdisp.c b/src/xdisp.c
index b80d21ade80..fb80f349967 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19401,7 +19401,7 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps)
19401 Called from x_produce_glyphs when IT->glyph_row is non-null. */ 19401 Called from x_produce_glyphs when IT->glyph_row is non-null. */
19402 19402
19403static INLINE void 19403static INLINE void
19404store_next_glyph (it) 19404append_glyph (it)
19405 struct it *it; 19405 struct it *it;
19406{ 19406{
19407 struct glyph *glyph; 19407 struct glyph *glyph;
@@ -19725,7 +19725,7 @@ append_stretch_glyph (it, object, width, height, ascent)
19725 ASCENT must be in the range 0 <= ASCENT <= 100. */ 19725 ASCENT must be in the range 0 <= ASCENT <= 100. */
19726 19726
19727static void 19727static void
19728generate_stretch_glyph (it) 19728produce_stretch_glyph (it)
19729 struct it *it; 19729 struct it *it;
19730{ 19730{
19731 /* (space :width WIDTH :height HEIGHT ...) */ 19731 /* (space :width WIDTH :height HEIGHT ...) */
@@ -20151,7 +20151,7 @@ x_produce_glyphs (it)
20151 it->ascent + it->descent, ascent); 20151 it->ascent + it->descent, ascent);
20152 } 20152 }
20153 else 20153 else
20154 store_next_glyph (it); 20154 append_glyph (it);
20155 20155
20156 /* If characters with lbearing or rbearing are displayed 20156 /* If characters with lbearing or rbearing are displayed
20157 in this line, record that fact in a flag of the 20157 in this line, record that fact in a flag of the
@@ -20333,7 +20333,7 @@ x_produce_glyphs (it)
20333 take_vertical_position_into_account (it); 20333 take_vertical_position_into_account (it);
20334 20334
20335 if (it->glyph_row) 20335 if (it->glyph_row)
20336 store_next_glyph (it); 20336 append_glyph (it);
20337 } 20337 }
20338 it->multibyte_p = saved_multibyte_p; 20338 it->multibyte_p = saved_multibyte_p;
20339 } 20339 }
@@ -20613,7 +20613,7 @@ x_produce_glyphs (it)
20613 else if (it->what == IT_IMAGE) 20613 else if (it->what == IT_IMAGE)
20614 produce_image_glyph (it); 20614 produce_image_glyph (it);
20615 else if (it->what == IT_STRETCH) 20615 else if (it->what == IT_STRETCH)
20616 generate_stretch_glyph (it); 20616 produce_stretch_glyph (it);
20617 20617
20618 /* Accumulate dimensions. Note: can't assume that it->descent > 0 20618 /* Accumulate dimensions. Note: can't assume that it->descent > 0
20619 because this isn't true for images with `:ascent 100'. */ 20619 because this isn't true for images with `:ascent 100'. */
@@ -23819,7 +23819,7 @@ before automatic hscrolling will horizontally scroll the window. */);
23819 23819
23820 DEFVAR_LISP ("hscroll-step", &Vhscroll_step, 23820 DEFVAR_LISP ("hscroll-step", &Vhscroll_step,
23821 doc: /* *How many columns to scroll the window when point gets too close to the edge. 23821 doc: /* *How many columns to scroll the window when point gets too close to the edge.
23822When point is less than `automatic-hscroll-margin' columns from the window 23822When point is less than `hscroll-margin' columns from the window
23823edge, automatic hscrolling will scroll the window by the amount of columns 23823edge, automatic hscrolling will scroll the window by the amount of columns
23824determined by this variable. If its value is a positive integer, scroll that 23824determined by this variable. If its value is a positive integer, scroll that
23825many columns. If it's a positive floating-point number, it specifies the 23825many columns. If it's a positive floating-point number, it specifies the
diff --git a/src/xfns.c b/src/xfns.c
index 6433f9172ab..a8388721dca 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -827,7 +827,6 @@ xg_set_icon (f, file)
827 UNBLOCK_INPUT; 827 UNBLOCK_INPUT;
828 } 828 }
829 829
830 UNGCPRO;
831 return result; 830 return result;
832} 831}
833 832
diff --git a/src/xterm.c b/src/xterm.c
index c17a25cbd05..73b2e2ae44d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6096,7 +6096,8 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6096 6096
6097 f = x_any_window_to_frame (dpyinfo, event.xkey.window); 6097 f = x_any_window_to_frame (dpyinfo, event.xkey.window);
6098 6098
6099 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) 6099 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
6100 && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window))
6100 { 6101 {
6101 clear_mouse_face (dpyinfo); 6102 clear_mouse_face (dpyinfo);
6102 dpyinfo->mouse_face_hidden = 1; 6103 dpyinfo->mouse_face_hidden = 1;
@@ -10260,8 +10261,6 @@ x_term_init (display_name, xrm_option, resource_name)
10260 10261
10261 if (! NILP (abs_file) && !NILP (Ffile_readable_p (abs_file))) 10262 if (! NILP (abs_file) && !NILP (Ffile_readable_p (abs_file)))
10262 gtk_rc_parse (SDATA (abs_file)); 10263 gtk_rc_parse (SDATA (abs_file));
10263
10264 UNGCPRO;
10265 } 10264 }
10266 10265
10267 XSetErrorHandler (x_error_handler); 10266 XSetErrorHandler (x_error_handler);