aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2006-02-17 09:10:23 +0000
committerMiles Bader2006-02-17 09:10:23 +0000
commitea3ac1d302c2b7c3754a58127a32b9bb53588f80 (patch)
treec389d4b639b8f81657bd1e4055db45e84fadb42a /src
parented1dba9d3f568168b1ca68537560c8b855818259 (diff)
parent6d21875b1f1fbb570ffefdfb93c8ff444a593348 (diff)
downloademacs-ea3ac1d302c2b7c3754a58127a32b9bb53588f80.tar.gz
emacs-ea3ac1d302c2b7c3754a58127a32b9bb53588f80.zip
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-17
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 85-96) - Update from CVS - Merge from erc--emacs--0 - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 30-36) - Merge from emacs--devo--0 - Update from CVS
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog34
-rw-r--r--src/frame.c10
-rw-r--r--src/gtkutil.c36
-rw-r--r--src/m/ibms390x.h163
-rw-r--r--src/macfns.c35
-rw-r--r--src/macmenu.c2
-rw-r--r--src/xfns.c10
-rw-r--r--src/xterm.c5
-rw-r--r--src/xterm.h2
9 files changed, 261 insertions, 36 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 12b0ff5b505..1276e2498ef 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,37 @@
12006-02-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * frame.c (x_get_arg): Clear out PARAM in ALIST also on Mac.
4
5 * macfns.c (x_set_menu_bar_lines): Menu bar is always shown on Mac.
6
7 * macmenu.c (set_frame_menubar): Don't call DrawMenuBar.
8
92006-02-14 Richard M. Stallman <rms@gnu.org>
10
11 * frame.c (x_get_arg): Clear out all occurrences of PARAM in ALIST.
12
13 * m/ibms390x.h: New file.
14
152006-02-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
16
17 * gtkutil.c (xg_tool_bar_detach_callback): Set show-arrow to the
18 value of x-gtk-whole-detached-tool-bar.
19 (xg_tool_bar_attach_callback): Set show-arrow to TRUE.
20
21 * xfns.c (syms_of_xfns): New variable: x-gtk-whole-detached-tool-bar.
22
232006-02-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
24
25 * xterm.c (x_x_to_emacs_modifiers): Make non-static.
26
27 * xterm.h: Declare x_x_to_emacs_modifiers.
28
29 * gtkutil.c (xg_tool_bar_button_cb): New function.
30 (xg_tool_bar_callback): Call x_x_to_emacs_modifiers to
31 store modifiers in event.
32 (update_frame_tool_bar): Connect button-release-event to
33 xg_tool_bar_button_cb.
34
12006-02-13 Richard M. Stallman <rms@gnu.org> 352006-02-13 Richard M. Stallman <rms@gnu.org>
2 36
3 * .gdbinit (xwindow): Update the code to show the window box. 37 * .gdbinit (xwindow): Update the code to show the window box.
diff --git a/src/frame.c b/src/frame.c
index b84eee01ae3..914bc5abf65 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3524,9 +3524,15 @@ x_get_arg (dpyinfo, alist, param, attribute, class, type)
3524 { 3524 {
3525 /* If we find this parm in ALIST, clear it out 3525 /* If we find this parm in ALIST, clear it out
3526 so that it won't be "left over" at the end. */ 3526 so that it won't be "left over" at the end. */
3527#ifdef HAVE_X_WINDOWS /* macfns.c and w32fns.c have not yet 3527#ifndef WINDOWSNT /* w32fns.c has not yet been changed to cope with this. */
3528 been changed to cope with this. */ 3528 Lisp_Object tail;
3529 XSETCAR (tem, Qnil); 3529 XSETCAR (tem, Qnil);
3530 /* In case the parameter appears more than once in the alist,
3531 clear it out. */
3532 for (tail = alist; CONSP (tail); tail = XCDR (tail))
3533 if (CONSP (XCAR (tail))
3534 && EQ (XCAR (XCAR (tail)), param))
3535 XSETCAR (XCAR (tail), Qnil);
3530#endif 3536#endif
3531 } 3537 }
3532 else 3538 else
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 3efc96cfe5d..5b7a5166888 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3242,11 +3242,28 @@ xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole)
3242 the GtkImage with a new image. */ 3242 the GtkImage with a new image. */
3243#define XG_TOOL_BAR_IMAGE_DATA "emacs-tool-bar-image" 3243#define XG_TOOL_BAR_IMAGE_DATA "emacs-tool-bar-image"
3244 3244
3245/* The key for storing the latest modifiers so the activate callback can
3246 get them. */
3247#define XG_TOOL_BAR_LAST_MODIFIER "emacs-tool-bar-modifier"
3248
3249
3245/* Callback function invoked when a tool bar item is pressed. 3250/* Callback function invoked when a tool bar item is pressed.
3246 W is the button widget in the tool bar that got pressed, 3251 W is the button widget in the tool bar that got pressed,
3247 CLIENT_DATA is an integer that is the index of the button in the 3252 CLIENT_DATA is an integer that is the index of the button in the
3248 tool bar. 0 is the first button. */ 3253 tool bar. 0 is the first button. */
3249 3254
3255static gboolean
3256xg_tool_bar_button_cb (widget, event, user_data)
3257 GtkWidget *widget;
3258 GdkEventButton *event;
3259 gpointer user_data;
3260{
3261 g_object_set_data (G_OBJECT (user_data), XG_TOOL_BAR_LAST_MODIFIER,
3262 (gpointer) event->state);
3263 return FALSE;
3264}
3265
3266
3250static void 3267static void
3251xg_tool_bar_callback (w, client_data) 3268xg_tool_bar_callback (w, client_data)
3252 GtkWidget *w; 3269 GtkWidget *w;
@@ -3254,6 +3271,8 @@ xg_tool_bar_callback (w, client_data)
3254{ 3271{
3255 /* The EMACS_INT cast avoids a warning. */ 3272 /* The EMACS_INT cast avoids a warning. */
3256 int idx = (int) (EMACS_INT) client_data; 3273 int idx = (int) (EMACS_INT) client_data;
3274 int mod = (int) g_object_get_data (G_OBJECT (w), XG_TOOL_BAR_LAST_MODIFIER);
3275
3257 FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); 3276 FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA);
3258 Lisp_Object key, frame; 3277 Lisp_Object key, frame;
3259 struct input_event event; 3278 struct input_event event;
@@ -3274,7 +3293,10 @@ xg_tool_bar_callback (w, client_data)
3274 event.kind = TOOL_BAR_EVENT; 3293 event.kind = TOOL_BAR_EVENT;
3275 event.frame_or_window = frame; 3294 event.frame_or_window = frame;
3276 event.arg = key; 3295 event.arg = key;
3277 event.modifiers = 0; /* These are not available. */ 3296 /* Convert between the modifier bits GDK uses and the modifier bits
3297 Emacs uses. This assumes GDK an X masks are the same, which they are when
3298 this is written. */
3299 event.modifiers = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), mod);
3278 kbd_buffer_store_event (&event); 3300 kbd_buffer_store_event (&event);
3279} 3301}
3280 3302
@@ -3292,6 +3314,10 @@ xg_tool_bar_detach_callback (wbox, w, client_data)
3292 gpointer client_data; 3314 gpointer client_data;
3293{ 3315{
3294 FRAME_PTR f = (FRAME_PTR) client_data; 3316 FRAME_PTR f = (FRAME_PTR) client_data;
3317 extern int x_gtk_whole_detached_tool_bar;
3318
3319 g_object_set (G_OBJECT (w), "show-arrow", !x_gtk_whole_detached_tool_bar,
3320 NULL);
3295 3321
3296 if (f) 3322 if (f)
3297 { 3323 {
@@ -3322,6 +3348,7 @@ xg_tool_bar_attach_callback (wbox, w, client_data)
3322 gpointer client_data; 3348 gpointer client_data;
3323{ 3349{
3324 FRAME_PTR f = (FRAME_PTR) client_data; 3350 FRAME_PTR f = (FRAME_PTR) client_data;
3351 g_object_set (G_OBJECT (w), "show-arrow", TRUE, NULL);
3325 3352
3326 if (f) 3353 if (f)
3327 { 3354 {
@@ -3629,6 +3656,13 @@ update_frame_tool_bar (f)
3629 while (! GTK_IS_BUTTON (w)) 3656 while (! GTK_IS_BUTTON (w))
3630 w = gtk_widget_get_parent (w); 3657 w = gtk_widget_get_parent (w);
3631 3658
3659 /* Callback to save modifyer mask (Shift/Control, etc). GTK makes
3660 no distinction based on modifiers in the activate callback,
3661 so we have to do it ourselves. */
3662 g_signal_connect (w, "button-release-event",
3663 GTK_SIGNAL_FUNC (xg_tool_bar_button_cb),
3664 ti);
3665
3632 g_object_set_data (G_OBJECT (w), XG_FRAME_DATA, (gpointer)f); 3666 g_object_set_data (G_OBJECT (w), XG_FRAME_DATA, (gpointer)f);
3633 3667
3634 /* Use enter/leave notify to show help. We use the events 3668 /* Use enter/leave notify to show help. We use the events
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h
new file mode 100644
index 00000000000..0d3acd34d97
--- /dev/null
+++ b/src/m/ibms390x.h
@@ -0,0 +1,163 @@
1/* machine description file for IBM S390 in 64-bit mode
2 Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19Boston, MA 02110-1301, USA. */
20
21/* This file was made by copying the significant parts of amdx86-64.h
22 into ibms390.h. */
23
24
25/* The following line tells the configuration script what sort of
26 operating system this machine is likely to run.
27 USUAL-OPSYS="<name of system .h file here, without the s- or .h>"
28
29NOTE-START
30IBM s390 64 bits (-machine=ibms390x64)
31
32 The possibilities for -opsystem are: gnu-linux.
33
34NOTE-END */
35
36#define BITS_PER_LONG 64
37#define BITS_PER_EMACS_INT 64
38
39/* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word
40 is the most significant byte. */
41
42#define WORDS_BIG_ENDIAN
43
44/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
45 * group of arguments and treat it as an array of the arguments. */
46
47#define NO_ARG_ARRAY
48
49/* Define WORD_MACHINE if addresses and such have
50 * to be corrected before they can be used as byte counts. */
51
52#define WORD_MACHINE
53
54/* Now define a symbol for the cpu type, if your compiler
55 does not define it automatically:
56 Ones defined so far include vax, m68000, ns16000, pyramid,
57 orion, tahoe, APOLLO and many others */
58
59/* Use type int rather than a union, to represent Lisp_Object */
60/* This is desirable for most machines. */
61
62#define NO_UNION_TYPE
63
64/* Define the type to use. */
65#define EMACS_INT long
66#define EMACS_UINT unsigned long
67#define SPECIAL_EMACS_INT
68
69/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
70 the 24-bit bit field into an int. In other words, if bit fields
71 are always unsigned.
72
73 If you use NO_UNION_TYPE, this flag does not matter. */
74
75#undef EXPLICIT_SIGN_EXTEND
76
77/* Data type of load average, as read out of kmem. */
78
79#define LOAD_AVE_TYPE long
80
81/* Convert that into an integer that is 100 for a load average of 1.0 */
82
83#define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
84
85/* Define CANNOT_DUMP on machines where unexec does not work.
86 Then the function dump-emacs will not be defined
87 and temacs will do (load "loadup") automatically unless told otherwise. */
88
89#undef CANNOT_DUMP
90
91/* Define VIRT_ADDR_VARIES if the virtual addresses of
92 pure and impure space as loaded can vary, and even their
93 relative order cannot be relied on.
94
95 Otherwise Emacs assumes that text space precedes data space,
96 numerically. */
97
98#define VIRT_ADDR_VARIES
99
100/* Define C_ALLOCA if this machine does not support a true alloca
101 and the one written in C should be used instead.
102 Define HAVE_ALLOCA to say that the system provides a properly
103 working alloca function and it should be used.
104 Define neither one if an assembler-language alloca
105 in the file alloca.s should be used. */
106
107#undef C_ALLOCA
108#define HAVE_ALLOCA
109
110/* Define NO_REMAP if memory segmentation makes it not work well
111 to change the boundary between the text section and data section
112 when Emacs is dumped. If you define this, the preloaded Lisp
113 code will not be sharable; but that's better than failing completely. */
114
115#undef NO_REMAP
116
117/* Some really obscure 4.2-based systems (like Sequent DYNIX)
118 * do not support asynchronous I/O (using SIGIO) on sockets,
119 * even though it works fine on tty's. If you have one of
120 * these systems, define the following, and then use it in
121 * config.h (or elsewhere) to decide when (not) to use SIGIO.
122 *
123 * You'd think this would go in an operating-system description file,
124 * but since it only occurs on some, but not all, BSD systems, the
125 * reasonable place to select for it is in the machine description
126 * file.
127 */
128
129#undef NO_SOCK_SIGIO
130
131
132/* After adding support for a new system, modify the large case
133 statement in the `configure' script to recognize reasonable
134 configuration names, and add a description of the system to
135 `etc/MACHINES'.
136
137 If you've just fixed a problem in an existing configuration file,
138 you should also check `etc/MACHINES' to make sure its descriptions
139 of known problems in that configuration should be updated. */
140
141#define PNTR_COMPARISON_TYPE unsigned long
142
143/* On the 64 bit architecture, we can use 60 bits for addresses */
144
145#define VALBITS 60
146
147/* This definition of MARKBIT is necessary because of the comparison of
148 ARRAY_MARK_FLAG and MARKBIT in an #if in lisp.h, which cpp doesn't like. */
149
150#define MARKBIT 0x8000000000000000L
151
152#define LINKER $(CC) -nostdlib
153
154/* Define XINT and XUINT so that they can take arguments of type int */
155#define XINT(a) (((long) (a) << (BITS_PER_LONG - VALBITS)) >> (BITS_PER_LONG - VALBITS))
156#define XUINT(a) ((long) (a) & VALMASK)
157
158/* Define XPNTR to avoid or'ing with DATA_SEG_BITS */
159
160#define XPNTR(a) XUINT (a)
161
162/* arch-tag: 4b87653c-6add-4663-8691-7d9dc17b5519
163 (do not change this comment) */
diff --git a/src/macfns.c b/src/macfns.c
index 3f59a459010..92c8b28adce 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -1647,36 +1647,15 @@ x_set_menu_bar_lines (f, value, oldval)
1647 struct frame *f; 1647 struct frame *f;
1648 Lisp_Object value, oldval; 1648 Lisp_Object value, oldval;
1649{ 1649{
1650 int nlines; 1650 /* Make sure we redisplay all windows in this frame. */
1651 int olines = FRAME_MENU_BAR_LINES (f); 1651 windows_or_buffers_changed++;
1652
1653 /* Right now, menu bars don't work properly in minibuf-only frames;
1654 most of the commands try to apply themselves to the minibuffer
1655 frame itself, and get an error because you can't switch buffers
1656 in or split the minibuffer window. */
1657 if (FRAME_MINIBUF_ONLY_P (f))
1658 return;
1659
1660 if (INTEGERP (value))
1661 nlines = XINT (value);
1662 else
1663 nlines = 0;
1664 1652
1665 FRAME_MENU_BAR_LINES (f) = 0; 1653 FRAME_MENU_BAR_LINES (f) = 0;
1666 if (nlines) 1654 /* The menu bar is always shown. */
1667 FRAME_EXTERNAL_MENU_BAR (f) = 1; 1655 FRAME_EXTERNAL_MENU_BAR (f) = 1;
1668 else 1656 if (FRAME_MAC_P (f) && f->output_data.mac->menubar_widget == 0)
1669 { 1657 /* Make sure next redisplay shows the menu bar. */
1670 if (FRAME_EXTERNAL_MENU_BAR (f) == 1) 1658 XWINDOW (FRAME_SELECTED_WINDOW (f))->update_mode_line = Qt;
1671 free_frame_menubar (f);
1672 FRAME_EXTERNAL_MENU_BAR (f) = 0;
1673
1674 /* Adjust the frame size so that the client (text) dimensions
1675 remain the same. This depends on FRAME_EXTERNAL_MENU_BAR being
1676 set correctly. */
1677 x_set_window_size (f, 0, FRAME_COLS (f), FRAME_LINES (f));
1678 do_pending_window_change (0);
1679 }
1680 adjust_glyphs (f); 1659 adjust_glyphs (f);
1681} 1660}
1682 1661
diff --git a/src/macmenu.c b/src/macmenu.c
index 91cf28f7456..bd4ad6291cf 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -1701,8 +1701,6 @@ set_frame_menubar (f, first_time, deep_p)
1701 1701
1702 fill_menubar (first_wv->contents); 1702 fill_menubar (first_wv->contents);
1703 1703
1704 DrawMenuBar ();
1705
1706 /* Add event handler so we can detect C-g. */ 1704 /* Add event handler so we can detect C-g. */
1707 install_menu_quit_handler (NULL); 1705 install_menu_quit_handler (NULL);
1708 free_menubar_widget_value_tree (first_wv); 1706 free_menubar_widget_value_tree (first_wv);
diff --git a/src/xfns.c b/src/xfns.c
index 24dd26bd469..2577272c122 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -159,6 +159,10 @@ int x_use_old_gtk_file_dialog;
159 159
160int x_gtk_show_hidden_files; 160int x_gtk_show_hidden_files;
161 161
162/* If non-zero, don't collapse to tool bar when it is detached. */
163
164int x_gtk_whole_detached_tool_bar;
165
162/* The background and shape of the mouse pointer, and shape when not 166/* The background and shape of the mouse pointer, and shape when not
163 over text or in the modeline. */ 167 over text or in the modeline. */
164 168
@@ -5790,6 +5794,12 @@ Note that this is just the default, there is a toggle button on the file
5790chooser to show or not show hidden files on a case by case basis. */); 5794chooser to show or not show hidden files on a case by case basis. */);
5791 x_gtk_show_hidden_files = 0; 5795 x_gtk_show_hidden_files = 0;
5792 5796
5797 DEFVAR_BOOL ("x-gtk-whole-detached-tool-bar", &x_gtk_whole_detached_tool_bar,
5798 doc: /* *If non-nil, a detached tool bar is shown in full.
5799The default is to just show an arrow and pressing on that arrow shows
5800the tool bar buttons. */);
5801 x_gtk_whole_detached_tool_bar = 0;
5802
5793 Fprovide (intern ("x"), Qnil); 5803 Fprovide (intern ("x"), Qnil);
5794 5804
5795#ifdef USE_X_TOOLKIT 5805#ifdef USE_X_TOOLKIT
diff --git a/src/xterm.c b/src/xterm.c
index 1d67ab51f01..e2e3744ae62 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -323,8 +323,7 @@ static void x_set_window_size_1 P_ ((struct frame *, int, int, int));
323static const XColor *x_color_cells P_ ((Display *, int *)); 323static const XColor *x_color_cells P_ ((Display *, int *));
324static void x_update_window_end P_ ((struct window *, int, int)); 324static void x_update_window_end P_ ((struct window *, int, int));
325void x_delete_display P_ ((struct x_display_info *)); 325void x_delete_display P_ ((struct x_display_info *));
326static unsigned int x_x_to_emacs_modifiers P_ ((struct x_display_info *, 326
327 unsigned));
328static int x_io_error_quitter P_ ((Display *)); 327static int x_io_error_quitter P_ ((Display *));
329int x_catch_errors P_ ((Display *)); 328int x_catch_errors P_ ((Display *));
330void x_uncatch_errors P_ ((Display *, int)); 329void x_uncatch_errors P_ ((Display *, int));
@@ -3470,7 +3469,7 @@ x_find_modifier_meanings (dpyinfo)
3470/* Convert between the modifier bits X uses and the modifier bits 3469/* Convert between the modifier bits X uses and the modifier bits
3471 Emacs uses. */ 3470 Emacs uses. */
3472 3471
3473static unsigned int 3472unsigned int
3474x_x_to_emacs_modifiers (dpyinfo, state) 3473x_x_to_emacs_modifiers (dpyinfo, state)
3475 struct x_display_info *dpyinfo; 3474 struct x_display_info *dpyinfo;
3476 unsigned int state; 3475 unsigned int state;
diff --git a/src/xterm.h b/src/xterm.h
index db8ae425a12..aeb408fd170 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1006,6 +1006,8 @@ extern void x_clear_area P_ ((Display *, Window, int, int, int, int, int));
1006extern void set_vertical_scroll_bar P_ ((struct window *)); 1006extern void set_vertical_scroll_bar P_ ((struct window *));
1007 1007
1008extern int x_dispatch_event P_ ((XEvent *, Display *)); 1008extern int x_dispatch_event P_ ((XEvent *, Display *));
1009extern unsigned int x_x_to_emacs_modifiers P_ ((struct x_display_info *,
1010 unsigned));
1009 1011
1010/* Defined in xselect.c */ 1012/* Defined in xselect.c */
1011 1013