aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-12-19 19:57:22 +0000
committerKaroly Lorentey2005-12-19 19:57:22 +0000
commite93b29568add51c918892153759a1fcd440e85be (patch)
tree4ca3494b355f5df3d0cdbe155eeaa3f630f293c1 /src
parent8d3cdf56502e89f00e86b02f24422acfa1b34beb (diff)
parent3031d8b0bb97f21c79b3022ff3e7564173facd18 (diff)
downloademacs-e93b29568add51c918892153759a1fcd440e85be.tar.gz
emacs-e93b29568add51c918892153759a1fcd440e85be.zip
Merged from miles@gnu.org--gnu-2005 (patch 169-173, 671-676)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-671 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-672 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-673 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-674 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-675 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-169 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-170 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-171 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-172 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-173 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-454
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit3
-rw-r--r--src/ChangeLog89
-rw-r--r--src/alloc.c11
-rw-r--r--src/coding.c5
-rw-r--r--src/fileio.c2
-rw-r--r--src/floatfns.c2
-rw-r--r--src/fns.c10
-rw-r--r--src/gtkutil.c19
-rw-r--r--src/keyboard.c27
-rw-r--r--src/keymap.c6
-rw-r--r--src/lisp.h2
-rw-r--r--src/macfns.c18
-rw-r--r--src/makefile.w32-in2
-rw-r--r--src/minibuf.c49
-rw-r--r--src/print.c2
-rw-r--r--src/w32fns.c21
-rw-r--r--src/xdisp.c6
-rw-r--r--src/xfns.c21
-rw-r--r--src/xmenu.c13
19 files changed, 218 insertions, 90 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index 7af2f7d5721..10f993fdd9f 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -768,6 +768,9 @@ show environment TERM
768# stdio stop working and therefore the `pr' command above as well. 768# stdio stop working and therefore the `pr' command above as well.
769break abort 769break abort
770 770
771# The MS-Windows build replaces abort with its own function.
772break w32_abort
773
771# If we are running in synchronous mode, we want a chance to look around 774# If we are running in synchronous mode, we want a chance to look around
772# before Emacs exits. Perhaps we should put the break somewhere else 775# before Emacs exits. Perhaps we should put the break somewhere else
773# instead... 776# instead...
diff --git a/src/ChangeLog b/src/ChangeLog
index 4994e7e8d6a..275477a765f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,92 @@
12005-12-17 Eli Zaretskii <eliz@gnu.org>
2
3 * makefile.w32-in (bootstrap-temacs): Warn that parts of commands
4 enclosed in $(ARGQUOTE)s should not be split between two lines, as
5 that will break with GNU Make >3.80, when sh.exe is used and
6 arg quoting is with '..'.
7
82005-12-17 Chong Yidong <cyd@stupidchicken.com>
9
10 * print.c (print_preprocess): Just signal an error if print_depth
11 is exceeded.
12
132005-12-17 Eli Zaretskii <eliz@gnu.org>
14
15 * .gdbinit: Set a breakpoint on w32_abort.
16
172005-12-16 Juri Linkov <juri@jurta.org>
18
19 * minibuf.c (Fminibuffer_completion_contents): New Lisp function
20 created from minibuffer_completion_contents.
21 (minibuffer_completion_contents): Remove.
22 (do_completion, Fminibuffer_complete_word)
23 (Fminibuffer_completion_help): Replace minibuffer_completion_contents
24 with Fminibuffer_completion_contents.
25 (syms_of_minibuf): Add Sminibuffer_completion_contents.
26 (Fdisplay_completion_list): Doc fix.
27 (display_completion_list_1): Use `nil' for second arg of
28 `Fdisplay_completion_list'.
29
302005-12-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
31
32 * xfns.c (compute_tip_xy): Handle negative dx and dy.
33
34 * w32fns.c (compute_tip_xy): Ditto
35
36 * macfns.c (compute_tip_xy): Ditto
37
382005-12-14 Chong Yidong <cyd@stupidchicken.com>
39
40 * print.c (print_preprocess): Go to a deeper print_depth to avoid
41 print_object loop.
42
432005-12-14 Kyotaro HORIGUCHI <horiguti@meadowy.org> (tiny change)
44
45 * coding.c (code_convert_region_unwind): GCPRO arg.
46
472005-12-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
48
49 * xfns.c (compute_tip_xy): Calculate root_y the same way as root_x,
50 i.e. dy is offset from top of frame instead of bottom.
51
52 * macfns.c (compute_tip_xy): Ditto.
53
54 * w32fns.c (compute_tip_xy): Ditto.
55
56 * gtkutil.c (SSDATA): New macro to remove compiler warnings.
57 (xg_get_image_for_pixmap, xg_create_frame_widgets)
58 (xg_get_file_with_chooser): Use SSDATA instead of SDATA.
59
60 * xmenu.c (menubar_selection_callback): Do nothing if the callback
61 is for an unselected radio menu item.
62
632005-12-11 Richard M. Stallman <rms@gnu.org>
64
65 * xdisp.c (syms_of_xdisp) <blink-cursor-alist>: Doc fix.
66
67 * lisp.h [! NO_UNION_TYPE] (EQ): Use == so args are computed just once.
68
69 * keymap.c (Fset_keymap_parent, store_in_keymap): Use CHECK_IMPURE.
70 (Flookup_key): Doc fix.
71 (syms_of_keymap) <function-key-map>: Doc fix.
72
73 * fns.c (Frequire): Treat evaluating from a source file
74 like loading the file.
75
76 * floatfns.c (Flog): Doc fix.
77
78 * fileio.c (Finsert_file_contents): Set Vdeactivate_mark
79 when we change the buffer.
80
812005-12-11 Juri Linkov <juri@jurta.org>
82
83 * minibuf.c (display_completion_list_1):
84 Call `minibuffer_completion_contents' instead of using `nil' as
85 second arg of `Fdisplay_completion_list'.
86 (keys_of_minibuf): Unbind SPC in
87 Vminibuffer_local_filename_completion_map (see also related
88 change on 2005-12-06).
89
12005-12-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 902005-12-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 91
3 * emacs.c (main) [MAC_OS8]: Undo previous change. 92 * emacs.c (main) [MAC_OS8]: Undo previous change.
diff --git a/src/alloc.c b/src/alloc.c
index 5ab28bc0cde..5d8ccdc7b7c 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4500,7 +4500,8 @@ mark_stack ()
4500/* Return 1 if OBJ is a valid lisp object. 4500/* Return 1 if OBJ is a valid lisp object.
4501 Return 0 if OBJ is NOT a valid lisp object. 4501 Return 0 if OBJ is NOT a valid lisp object.
4502 Return -1 if we cannot validate OBJ. 4502 Return -1 if we cannot validate OBJ.
4503*/ 4503 This function can be quite slow,
4504 so it should only be used in code for manual debugging. */
4504 4505
4505int 4506int
4506valid_lisp_object_p (obj) 4507valid_lisp_object_p (obj)
@@ -4526,11 +4527,11 @@ valid_lisp_object_p (obj)
4526 trying), so we trick the o/s to tell us whether p is a valid 4527 trying), so we trick the o/s to tell us whether p is a valid
4527 pointer. Unfortunately, we cannot use NULL_DEVICE here, as 4528 pointer. Unfortunately, we cannot use NULL_DEVICE here, as
4528 emacs_write may not validate p in that case. */ 4529 emacs_write may not validate p in that case. */
4529 if ((fd = emacs_open("__Valid__Lisp__Object__", O_CREAT | O_WRONLY | O_TRUNC, 0666)) >= 0) 4530 if ((fd = emacs_open ("__Valid__Lisp__Object__", O_CREAT | O_WRONLY | O_TRUNC, 0666)) >= 0)
4530 { 4531 {
4531 int valid = emacs_write(fd, (char *)p, 16) == 16; 4532 int valid = (emacs_write (fd, (char *)p, 16) == 16);
4532 emacs_close(fd); 4533 emacs_close (fd);
4533 unlink("__Valid__Lisp__Object__"); 4534 unlink ("__Valid__Lisp__Object__");
4534 return valid; 4535 return valid;
4535 } 4536 }
4536 4537
diff --git a/src/coding.c b/src/coding.c
index d032f8c9483..0ffb37f4bfa 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -5356,10 +5356,15 @@ static Lisp_Object
5356code_convert_region_unwind (arg) 5356code_convert_region_unwind (arg)
5357 Lisp_Object arg; 5357 Lisp_Object arg;
5358{ 5358{
5359 struct gcpro gcpro1;
5360 GCPRO1 (arg);
5361
5359 inhibit_pre_post_conversion = 0; 5362 inhibit_pre_post_conversion = 0;
5360 Vlast_coding_system_used = XCAR (arg); 5363 Vlast_coding_system_used = XCAR (arg);
5361 for (arg = XCDR (arg); ! NILP (arg); arg = XCDR (arg)) 5364 for (arg = XCDR (arg); ! NILP (arg); arg = XCDR (arg))
5362 Fkill_buffer (XCAR (arg)); 5365 Fkill_buffer (XCAR (arg));
5366
5367 UNGCPRO;
5363 return Qnil; 5368 return Qnil;
5364} 5369}
5365 5370
diff --git a/src/fileio.c b/src/fileio.c
index 40e3a3c6e6c..4e9ac9541c3 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4556,6 +4556,8 @@ actually used. */)
4556#endif 4556#endif
4557 Vdeactivate_mark = old_Vdeactivate_mark; 4557 Vdeactivate_mark = old_Vdeactivate_mark;
4558 } 4558 }
4559 else
4560 Vdeactivate_mark = Qt;
4559 4561
4560 /* Make the text read part of the buffer. */ 4562 /* Make the text read part of the buffer. */
4561 GAP_SIZE -= inserted; 4563 GAP_SIZE -= inserted;
diff --git a/src/floatfns.c b/src/floatfns.c
index 79574e0a69b..71f53542283 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -508,7 +508,7 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
508 508
509DEFUN ("log", Flog, Slog, 1, 2, 0, 509DEFUN ("log", Flog, Slog, 1, 2, 0,
510 doc: /* Return the natural logarithm of ARG. 510 doc: /* Return the natural logarithm of ARG.
511If second optional argument BASE is given, return log ARG using that base. */) 511If the optional argument BASE is given, return log ARG using that base. */)
512 (arg, base) 512 (arg, base)
513 register Lisp_Object arg, base; 513 register Lisp_Object arg, base;
514{ 514{
diff --git a/src/fns.c b/src/fns.c
index d0d4da4cd57..d30d49a80c7 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -3564,14 +3564,20 @@ The normal messages at start and end of loading FILENAME are suppressed. */)
3564{ 3564{
3565 register Lisp_Object tem; 3565 register Lisp_Object tem;
3566 struct gcpro gcpro1, gcpro2; 3566 struct gcpro gcpro1, gcpro2;
3567 int from_file = load_in_progress;
3567 3568
3568 CHECK_SYMBOL (feature); 3569 CHECK_SYMBOL (feature);
3569 3570
3570 /* Record the presence of `require' in this file 3571 /* Record the presence of `require' in this file
3571 even if the feature specified is already loaded. 3572 even if the feature specified is already loaded.
3572 But not more than once in any file, 3573 But not more than once in any file,
3573 and not when we aren't loading a file. */ 3574 and not when we aren't loading or reading from a file. */
3574 if (load_in_progress) 3575 if (!from_file)
3576 for (tem = Vcurrent_load_list; CONSP (tem); tem = XCDR (tem))
3577 if (NILP (XCDR (tem)) && STRINGP (XCAR (tem)))
3578 from_file = 1;
3579
3580 if (from_file)
3575 { 3581 {
3576 tem = Fcons (Qrequire, feature); 3582 tem = Fcons (Qrequire, feature);
3577 if (NILP (Fmember (tem, Vcurrent_load_list))) 3583 if (NILP (Fmember (tem, Vcurrent_load_list)))
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 84ce64beb56..54cb43b8398 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -41,6 +41,9 @@ Boston, MA 02110-1301, USA. */
41#define FRAME_TOTAL_PIXEL_HEIGHT(f) \ 41#define FRAME_TOTAL_PIXEL_HEIGHT(f) \
42 (FRAME_PIXEL_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f)) 42 (FRAME_PIXEL_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
43 43
44/* Avoid "differ in sign" warnings */
45#define SSDATA(x) ((char *) SDATA (x))
46
44 47
45/*********************************************************************** 48/***********************************************************************
46 Display handling functions 49 Display handling functions
@@ -347,9 +350,9 @@ xg_get_image_for_pixmap (f, img, widget, old_widget)
347 xassert (STRINGP (file) != 0); 350 xassert (STRINGP (file) != 0);
348 351
349 if (! old_widget) 352 if (! old_widget)
350 old_widget = GTK_IMAGE (gtk_image_new_from_file (SDATA (file))); 353 old_widget = GTK_IMAGE (gtk_image_new_from_file (SSDATA (file)));
351 else 354 else
352 gtk_image_set_from_file (old_widget, SDATA (file)); 355 gtk_image_set_from_file (old_widget, SSDATA (file));
353 356
354 UNGCPRO; 357 UNGCPRO;
355 return GTK_WIDGET (old_widget); 358 return GTK_WIDGET (old_widget);
@@ -735,11 +738,11 @@ xg_create_frame_widgets (f)
735 /* Use same names as the Xt port does. I.e. Emacs.pane.emacs by default */ 738 /* Use same names as the Xt port does. I.e. Emacs.pane.emacs by default */
736 gtk_widget_set_name (wtop, EMACS_CLASS); 739 gtk_widget_set_name (wtop, EMACS_CLASS);
737 gtk_widget_set_name (wvbox, "pane"); 740 gtk_widget_set_name (wvbox, "pane");
738 gtk_widget_set_name (wfixed, SDATA (Vx_resource_name)); 741 gtk_widget_set_name (wfixed, SSDATA (Vx_resource_name));
739 742
740 /* If this frame has a title or name, set it in the title bar. */ 743 /* If this frame has a title or name, set it in the title bar. */
741 if (! NILP (f->title)) title = SDATA (ENCODE_UTF_8 (f->title)); 744 if (! NILP (f->title)) title = SSDATA (ENCODE_UTF_8 (f->title));
742 else if (! NILP (f->name)) title = SDATA (ENCODE_UTF_8 (f->name)); 745 else if (! NILP (f->name)) title = SSDATA (ENCODE_UTF_8 (f->name));
743 746
744 if (title) gtk_window_set_title (GTK_WINDOW (wtop), title); 747 if (title) gtk_window_set_title (GTK_WINDOW (wtop), title);
745 748
@@ -780,8 +783,8 @@ xg_create_frame_widgets (f)
780 can't shrink the window from its starting size. */ 783 can't shrink the window from its starting size. */
781 gtk_window_set_policy (GTK_WINDOW (wtop), TRUE, TRUE, TRUE); 784 gtk_window_set_policy (GTK_WINDOW (wtop), TRUE, TRUE, TRUE);
782 gtk_window_set_wmclass (GTK_WINDOW (wtop), 785 gtk_window_set_wmclass (GTK_WINDOW (wtop),
783 SDATA (Vx_resource_name), 786 SSDATA (Vx_resource_name),
784 SDATA (Vx_resource_class)); 787 SSDATA (Vx_resource_class));
785 788
786 /* Add callback to do nothing on WM_DELETE_WINDOW. The default in 789 /* Add callback to do nothing on WM_DELETE_WINDOW. The default in
787 GTK is to destroy the widget. We want Emacs to do that instead. */ 790 GTK is to destroy the widget. We want Emacs to do that instead. */
@@ -1245,7 +1248,7 @@ xg_get_file_with_chooser (f, prompt, default_filename,
1245 if (default_filename[0] != '/') 1248 if (default_filename[0] != '/')
1246 file = Fexpand_file_name (file, Qnil); 1249 file = Fexpand_file_name (file, Qnil);
1247 1250
1248 default_filename = SDATA (file); 1251 default_filename = SSDATA (file);
1249 if (Ffile_directory_p (file)) 1252 if (Ffile_directory_p (file))
1250 gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filewin), 1253 gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filewin),
1251 default_filename); 1254 default_filename);
diff --git a/src/keyboard.c b/src/keyboard.c
index 4bc426222f0..2082abdf45b 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -11587,17 +11587,12 @@ numeric keysym code (sans the \"system-specific\" bit 1<<28)
11587and SYMBOL is its name. 11587and SYMBOL is its name.
11588 11588
11589`system-key-alist' has a separate binding for each display device. 11589`system-key-alist' has a separate binding for each display device.
11590See Info node `(elisp)Multiple displays'. 11590See Info node `(elisp)Multiple displays'. */);
11591
11592Note that the currently selected frame has very little to do with
11593which binding of this variable is active at any given moment. If you
11594need set or get the binding on a specific display, use
11595`terminal-local-value' and `set-terminal-local-value'. */);
11596 11591
11597 DEFVAR_KBOARD ("local-function-key-map", Vlocal_function_key_map, 11592 DEFVAR_KBOARD ("local-function-key-map", Vlocal_function_key_map,
11598 doc: /* Keymap mapping ASCII function key sequences onto their preferred forms. 11593 doc: /* Keymap that translates key sequences to key sequences during input.
11599This allows Emacs to recognize function keys sent from ASCII 11594This is used mainly for mapping ASCII function key sequences into
11600terminals at any point in a key sequence. 11595real Emacs function key events (symbols).
11601 11596
11602The `read-key-sequence' function replaces any subsequence bound by 11597The `read-key-sequence' function replaces any subsequence bound by
11603`local-function-key-map' with its binding. More precisely, when the 11598`local-function-key-map' with its binding. More precisely, when the
@@ -11618,12 +11613,7 @@ typing `ESC O P x' would return [f1 x].
11618device. See Info node `(elisp)Multiple displays'. If you need to 11613device. See Info node `(elisp)Multiple displays'. If you need to
11619define a binding on all display devices, change `function-key-map' 11614define a binding on all display devices, change `function-key-map'
11620instead. Initially, `local-function-key-map' is an empty keymap that 11615instead. Initially, `local-function-key-map' is an empty keymap that
11621has `function-key-map' as its parent on all display devices. 11616has `function-key-map' as its parent on all display devices. */);
11622
11623Note that the currently selected frame has very little to do with
11624which binding of this variable is active at any given moment. If you
11625need set or get the binding on a specific display, use
11626`terminal-local-value' and `set-terminal-local-value'. */);
11627 11617
11628 DEFVAR_LISP ("function-key-map", &Vfunction_key_map, 11618 DEFVAR_LISP ("function-key-map", &Vfunction_key_map,
11629 doc: /* The parent keymap of all `local-function-key-map' instances. 11619 doc: /* The parent keymap of all `local-function-key-map' instances.
@@ -11640,12 +11630,7 @@ and its non-prefix bindings override ordinary bindings.
11640 11630
11641`key-translation-map' has a separate binding for each display device. 11631`key-translation-map' has a separate binding for each display device.
11642(See Info node `(elisp)Multiple displays'.) If you need to set a key 11632(See Info node `(elisp)Multiple displays'.) If you need to set a key
11643translation on all devices, change `global-key-translation-map' instead. 11633translation on all devices, change `global-key-translation-map' instead. */);
11644
11645Note that the currently selected frame has very little to do with
11646which binding of this variable is active at any given moment. If you
11647need set or get the binding on a specific display, use
11648`terminal-local-value' and `set-terminal-local-value'. */);
11649 11634
11650 DEFVAR_LISP ("key-translation-map", &Vkey_translation_map, 11635 DEFVAR_LISP ("key-translation-map", &Vkey_translation_map,
11651 doc: /* The parent keymap of all `local-key-translation-map' instances. 11636 doc: /* The parent keymap of all `local-key-translation-map' instances.
diff --git a/src/keymap.c b/src/keymap.c
index 36517cf0794..97789a75f1d 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -389,6 +389,7 @@ Return PARENT. PARENT should be nil or another keymap. */)
389 if (EQ (XCDR (prev), parent)) 389 if (EQ (XCDR (prev), parent))
390 RETURN_UNGCPRO (parent); 390 RETURN_UNGCPRO (parent);
391 391
392 CHECK_IMPURE (prev);
392 XSETCDR (prev, parent); 393 XSETCDR (prev, parent);
393 break; 394 break;
394 } 395 }
@@ -906,6 +907,7 @@ store_in_keymap (keymap, idx, def)
906 { 907 {
907 if (NATNUMP (idx) && XFASTINT (idx) < ASIZE (elt)) 908 if (NATNUMP (idx) && XFASTINT (idx) < ASIZE (elt))
908 { 909 {
910 CHECK_IMPURE (elt);
909 ASET (elt, XFASTINT (idx), def); 911 ASET (elt, XFASTINT (idx), def);
910 return def; 912 return def;
911 } 913 }
@@ -931,6 +933,7 @@ store_in_keymap (keymap, idx, def)
931 { 933 {
932 if (EQ (idx, XCAR (elt))) 934 if (EQ (idx, XCAR (elt)))
933 { 935 {
936 CHECK_IMPURE (elt);
934 XSETCDR (elt, def); 937 XSETCDR (elt, def);
935 return def; 938 return def;
936 } 939 }
@@ -948,6 +951,7 @@ store_in_keymap (keymap, idx, def)
948 keymap_end: 951 keymap_end:
949 /* We have scanned the entire keymap, and not found a binding for 952 /* We have scanned the entire keymap, and not found a binding for
950 IDX. Let's add one. */ 953 IDX. Let's add one. */
954 CHECK_IMPURE (insertion_point);
951 XSETCDR (insertion_point, 955 XSETCDR (insertion_point,
952 Fcons (Fcons (idx, def), XCDR (insertion_point))); 956 Fcons (Fcons (idx, def), XCDR (insertion_point)));
953 } 957 }
@@ -1210,7 +1214,7 @@ A number as value means KEY is "too long";
1210that is, characters or symbols in it except for the last one 1214that is, characters or symbols in it except for the last one
1211fail to be a valid sequence of prefix characters in KEYMAP. 1215fail to be a valid sequence of prefix characters in KEYMAP.
1212The number is how many characters at the front of KEY 1216The number is how many characters at the front of KEY
1213it takes to reach a non-prefix command. 1217it takes to reach a non-prefix key.
1214 1218
1215Normally, `lookup-key' ignores bindings for t, which act as default 1219Normally, `lookup-key' ignores bindings for t, which act as default
1216bindings, used when nothing else in the keymap applies; this makes it 1220bindings, used when nothing else in the keymap applies; this makes it
diff --git a/src/lisp.h b/src/lisp.h
index f440f104cb9..dd9992d08be 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -454,7 +454,7 @@ enum pvec_type
454extern Lisp_Object make_number P_ ((EMACS_INT)); 454extern Lisp_Object make_number P_ ((EMACS_INT));
455#endif 455#endif
456 456
457#define EQ(x, y) ((x).s.val == (y).s.val && (x).s.type == (y).s.type) 457#define EQ(x, y) ((x).i == (y).i)
458 458
459#endif /* NO_UNION_TYPE */ 459#endif /* NO_UNION_TYPE */
460 460
diff --git a/src/macfns.c b/src/macfns.c
index 9d23f47b5ed..99abc643043 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -3840,16 +3840,22 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
3840 3840
3841 if (INTEGERP (top)) 3841 if (INTEGERP (top))
3842 *root_y = XINT (top); 3842 *root_y = XINT (top);
3843 else if (*root_y + XINT (dy) - height < 0) 3843 else if (*root_y + XINT (dy) <= 0)
3844 *root_y -= XINT (dy); 3844 *root_y = 0; /* Can happen for negative dy */
3845 else if (*root_y + XINT (dy) + height <= FRAME_MAC_DISPLAY_INFO (f)->height)
3846 /* It fits below the pointer */
3847 *root_y += XINT (dy);
3848 else if (height + XINT (dy) <= *root_y)
3849 /* It fits above the pointer. */
3850 *root_y -= height + XINT (dy);
3845 else 3851 else
3846 { 3852 /* Put it on the top. */
3847 *root_y -= height; 3853 *root_y = 0;
3848 *root_y += XINT (dy);
3849 }
3850 3854
3851 if (INTEGERP (left)) 3855 if (INTEGERP (left))
3852 *root_x = XINT (left); 3856 *root_x = XINT (left);
3857 else if (*root_x + XINT (dx) <= 0)
3858 *root_x = 0; /* Can happen for negative dx */
3853 else if (*root_x + XINT (dx) + width <= FRAME_MAC_DISPLAY_INFO (f)->width) 3859 else if (*root_x + XINT (dx) + width <= FRAME_MAC_DISPLAY_INFO (f)->width)
3854 /* It fits to the right of the pointer. */ 3860 /* It fits to the right of the pointer. */
3855 *root_x += XINT (dx); 3861 *root_x += XINT (dx);
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 1ee232949d9..76ad4624712 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -182,6 +182,8 @@ bootstrap: bootstrap-emacs
182# Build a temacs with a sufficiently large PURESIZE to load the 182# Build a temacs with a sufficiently large PURESIZE to load the
183# Lisp files from loadup.el in source form. 183# Lisp files from loadup.el in source form.
184# 184#
185# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
186# this can break with GNU Make 3.81 and later if sh.exe is used.
185bootstrap-temacs: 187bootstrap-temacs:
186 $(MAKE) $(MFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE) 188 $(MAKE) $(MFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE)
187 189
diff --git a/src/minibuf.c b/src/minibuf.c
index 2efb3cf4817..8cc014f84ee 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -389,6 +389,19 @@ The current buffer must be a minibuffer. */)
389 return make_buffer_string (prompt_end, ZV, 0); 389 return make_buffer_string (prompt_end, ZV, 0);
390} 390}
391 391
392DEFUN ("minibuffer-completion-contents", Fminibuffer_completion_contents,
393 Sminibuffer_completion_contents, 0, 0, 0,
394 doc: /* Return the user input in a minibuffer before point as a string.
395That is what completion commands operate on.
396The current buffer must be a minibuffer. */)
397 ()
398{
399 int prompt_end = XINT (Fminibuffer_prompt_end ());
400 if (PT < prompt_end)
401 error ("Cannot do completion in the prompt");
402 return make_buffer_string (prompt_end, PT, 1);
403}
404
392DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents, 405DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents,
393 Sdelete_minibuffer_contents, 0, 0, 0, 406 Sdelete_minibuffer_contents, 0, 0, 0,
394 doc: /* Delete all user input in a minibuffer. 407 doc: /* Delete all user input in a minibuffer.
@@ -401,17 +414,6 @@ The current buffer must be a minibuffer. */)
401 return Qnil; 414 return Qnil;
402} 415}
403 416
404/* Get the text in the minibuffer before point.
405 That is what completion commands operate on. */
406
407Lisp_Object
408minibuffer_completion_contents ()
409{
410 int prompt_end = XINT (Fminibuffer_prompt_end ());
411 if (PT < prompt_end)
412 error ("Cannot do completion in the prompt");
413 return make_buffer_string (prompt_end, PT, 1);
414}
415 417
416/* Read from the minibuffer using keymap MAP and initial contents INITIAL, 418/* Read from the minibuffer using keymap MAP and initial contents INITIAL,
417 putting point minus BACKUP_N bytes from the end of INITIAL, 419 putting point minus BACKUP_N bytes from the end of INITIAL,
@@ -1905,7 +1907,7 @@ do_completion ()
1905 Lisp_Object last; 1907 Lisp_Object last;
1906 struct gcpro gcpro1, gcpro2; 1908 struct gcpro gcpro1, gcpro2;
1907 1909
1908 completion = Ftry_completion (minibuffer_completion_contents (), 1910 completion = Ftry_completion (Fminibuffer_completion_contents (),
1909 Vminibuffer_completion_table, 1911 Vminibuffer_completion_table,
1910 Vminibuffer_completion_predicate); 1912 Vminibuffer_completion_predicate);
1911 last = last_exact_completion; 1913 last = last_exact_completion;
@@ -1927,7 +1929,7 @@ do_completion ()
1927 return 1; 1929 return 1;
1928 } 1930 }
1929 1931
1930 string = minibuffer_completion_contents (); 1932 string = Fminibuffer_completion_contents ();
1931 1933
1932 /* COMPLETEDP should be true if some completion was done, which 1934 /* COMPLETEDP should be true if some completion was done, which
1933 doesn't include simply changing the case of the entered string. 1935 doesn't include simply changing the case of the entered string.
@@ -1994,7 +1996,7 @@ do_completion ()
1994 last_exact_completion = completion; 1996 last_exact_completion = completion;
1995 if (!NILP (last)) 1997 if (!NILP (last))
1996 { 1998 {
1997 tem = minibuffer_completion_contents (); 1999 tem = Fminibuffer_completion_contents ();
1998 if (!NILP (Fequal (tem, last))) 2000 if (!NILP (Fequal (tem, last)))
1999 Fminibuffer_completion_help (); 2001 Fminibuffer_completion_help ();
2000 } 2002 }
@@ -2197,7 +2199,7 @@ Return nil if there is no valid completion, else t. */)
2197 /* We keep calling Fbuffer_string rather than arrange for GC to 2199 /* We keep calling Fbuffer_string rather than arrange for GC to
2198 hold onto a pointer to one of the strings thus made. */ 2200 hold onto a pointer to one of the strings thus made. */
2199 2201
2200 completion = Ftry_completion (minibuffer_completion_contents (), 2202 completion = Ftry_completion (Fminibuffer_completion_contents (),
2201 Vminibuffer_completion_table, 2203 Vminibuffer_completion_table,
2202 Vminibuffer_completion_predicate); 2204 Vminibuffer_completion_predicate);
2203 if (NILP (completion)) 2205 if (NILP (completion))
@@ -2229,7 +2231,7 @@ Return nil if there is no valid completion, else t. */)
2229 int buffer_nchars, completion_nchars; 2231 int buffer_nchars, completion_nchars;
2230 2232
2231 CHECK_STRING (completion); 2233 CHECK_STRING (completion);
2232 tem = minibuffer_completion_contents (); 2234 tem = Fminibuffer_completion_contents ();
2233 GCPRO2 (completion, tem); 2235 GCPRO2 (completion, tem);
2234 /* If reading a file name, 2236 /* If reading a file name,
2235 expand any $ENVVAR refs in the buffer and in TEM. */ 2237 expand any $ENVVAR refs in the buffer and in TEM. */
@@ -2293,7 +2295,7 @@ Return nil if there is no valid completion, else t. */)
2293 if (i == SCHARS (completion)) 2295 if (i == SCHARS (completion))
2294 { 2296 {
2295 GCPRO1 (completion); 2297 GCPRO1 (completion);
2296 tem = Ftry_completion (concat2 (minibuffer_completion_contents (), 2298 tem = Ftry_completion (concat2 (Fminibuffer_completion_contents (),
2297 build_string (" ")), 2299 build_string (" ")),
2298 Vminibuffer_completion_table, 2300 Vminibuffer_completion_table,
2299 Vminibuffer_completion_predicate); 2301 Vminibuffer_completion_predicate);
@@ -2305,7 +2307,7 @@ Return nil if there is no valid completion, else t. */)
2305 { 2307 {
2306 GCPRO1 (completion); 2308 GCPRO1 (completion);
2307 tem = 2309 tem =
2308 Ftry_completion (concat2 (minibuffer_completion_contents (), 2310 Ftry_completion (concat2 (Fminibuffer_completion_contents (),
2309 build_string ("-")), 2311 build_string ("-")),
2310 Vminibuffer_completion_table, 2312 Vminibuffer_completion_table,
2311 Vminibuffer_completion_predicate); 2313 Vminibuffer_completion_predicate);
@@ -2377,8 +2379,8 @@ The optional second arg COMMON-SUBSTRING is a string.
2377It is used to put faces, `completions-first-difference' and 2379It is used to put faces, `completions-first-difference' and
2378`completions-common-part' on the completion buffer. The 2380`completions-common-part' on the completion buffer. The
2379`completions-common-part' face is put on the common substring 2381`completions-common-part' face is put on the common substring
2380specified by COMMON-SUBSTRING. If COMMON-SUBSTRING is nil, 2382specified by COMMON-SUBSTRING. If COMMON-SUBSTRING is nil
2381the faces are not put. 2383and the current buffer is not the minibuffer, the faces are not put.
2382Internally, COMMON-SUBSTRING is bound to `completion-common-substring' 2384Internally, COMMON-SUBSTRING is bound to `completion-common-substring'
2383during running `completion-setup-hook'. */) 2385during running `completion-setup-hook'. */)
2384 (completions, common_substring) 2386 (completions, common_substring)
@@ -2580,7 +2582,7 @@ DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_co
2580 Lisp_Object completions; 2582 Lisp_Object completions;
2581 2583
2582 message ("Making completion list..."); 2584 message ("Making completion list...");
2583 completions = Fall_completions (minibuffer_completion_contents (), 2585 completions = Fall_completions (Fminibuffer_completion_contents (),
2584 Vminibuffer_completion_table, 2586 Vminibuffer_completion_table,
2585 Vminibuffer_completion_predicate, 2587 Vminibuffer_completion_predicate,
2586 Qt); 2588 Qt);
@@ -2889,6 +2891,7 @@ properties. */);
2889 defsubr (&Sminibuffer_prompt_end); 2891 defsubr (&Sminibuffer_prompt_end);
2890 defsubr (&Sminibuffer_contents); 2892 defsubr (&Sminibuffer_contents);
2891 defsubr (&Sminibuffer_contents_no_properties); 2893 defsubr (&Sminibuffer_contents_no_properties);
2894 defsubr (&Sminibuffer_completion_contents);
2892 defsubr (&Sdelete_minibuffer_contents); 2895 defsubr (&Sdelete_minibuffer_contents);
2893 2896
2894 defsubr (&Stry_completion); 2897 defsubr (&Stry_completion);
@@ -2940,8 +2943,8 @@ keys_of_minibuf ()
2940 initial_define_key (Vminibuffer_local_must_match_map, Ctl ('j'), 2943 initial_define_key (Vminibuffer_local_must_match_map, Ctl ('j'),
2941 "minibuffer-complete-and-exit"); 2944 "minibuffer-complete-and-exit");
2942 2945
2943 initial_define_key (Vminibuffer_local_must_match_filename_map, ' ', 2946 Fdefine_key (Vminibuffer_local_must_match_filename_map,
2944 "self-insert-command"); 2947 build_string (" "), Qnil);
2945} 2948}
2946 2949
2947/* arch-tag: 8f69b601-fba3-484c-a6dd-ceaee54a7a73 2950/* arch-tag: 8f69b601-fba3-484c-a6dd-ceaee54a7a73
diff --git a/src/print.c b/src/print.c
index d563580ddd3..20c359f9b69 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1314,7 +1314,7 @@ print_preprocess (obj)
1314 /* Give up if we go so deep that print_object will get an error. */ 1314 /* Give up if we go so deep that print_object will get an error. */
1315 /* See similar code in print_object. */ 1315 /* See similar code in print_object. */
1316 if (print_depth >= PRINT_CIRCLE) 1316 if (print_depth >= PRINT_CIRCLE)
1317 return; 1317 error ("Apparently circular structure being printed");
1318 1318
1319 /* Avoid infinite recursion for circular nested structure 1319 /* Avoid infinite recursion for circular nested structure
1320 in the case where Vprint_circle is nil. */ 1320 in the case where Vprint_circle is nil. */
diff --git a/src/w32fns.c b/src/w32fns.c
index d1e4e49bb03..b82814bca72 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -7411,19 +7411,22 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
7411 7411
7412 if (INTEGERP (top)) 7412 if (INTEGERP (top))
7413 *root_y = XINT (top); 7413 *root_y = XINT (top);
7414 else if (*root_y + XINT (dy) - height < 0) 7414 else if (*root_y + XINT (dy) <= 0)
7415 *root_y -= XINT (dy); 7415 *root_y = 0; /* Can happen for negative dy */
7416 /* If there's not enough place below the pointer, put tip above it. */ 7416 else if (*root_y + XINT (dy) + height <= FRAME_W32_DISPLAY_INFO (f)->height)
7417 else if (*root_y + XINT (dy) >= FRAME_W32_DISPLAY_INFO (f)->height) 7417 /* It fits below the pointer */
7418 *root_y -= XINT (dy);
7419 else
7420 {
7421 *root_y -= height;
7422 *root_y += XINT (dy); 7418 *root_y += XINT (dy);
7423 } 7419 else if (height + XINT (dy) <= *root_y)
7420 /* It fits above the pointer. */
7421 *root_y -= height + XINT (dy);
7422 else
7423 /* Put it on the top. */
7424 *root_y = 0;
7424 7425
7425 if (INTEGERP (left)) 7426 if (INTEGERP (left))
7426 *root_x = XINT (left); 7427 *root_x = XINT (left);
7428 else if (*root_x + XINT (dx) <= 0)
7429 *root_x = 0; /* Can happen for negative dx */
7427 else if (*root_x + XINT (dx) + width <= FRAME_W32_DISPLAY_INFO (f)->width) 7430 else if (*root_x + XINT (dx) + width <= FRAME_W32_DISPLAY_INFO (f)->width)
7428 /* It fits to the right of the pointer. */ 7431 /* It fits to the right of the pointer. */
7429 *root_x += XINT (dx); 7432 *root_x += XINT (dx);
diff --git a/src/xdisp.c b/src/xdisp.c
index 623a1b3a524..1f04b1eac27 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -23645,7 +23645,11 @@ go back to their normal size. */);
23645Each element has the form (ON-STATE . OFF-STATE). Whenever the 23645Each element has the form (ON-STATE . OFF-STATE). Whenever the
23646`cursor-type' frame-parameter or variable equals ON-STATE, 23646`cursor-type' frame-parameter or variable equals ON-STATE,
23647comparing using `equal', Emacs uses OFF-STATE to specify 23647comparing using `equal', Emacs uses OFF-STATE to specify
23648how to blink it off. */); 23648how to blink it off. ON-STATE and OFF-STATE are values for
23649the `cursor-type' frame parameter.
23650
23651If a frame's ON-STATE has no entry in this list,
23652the frame's other specifications determine how to blink the cursor off. */);
23649 Vblink_cursor_alist = Qnil; 23653 Vblink_cursor_alist = Qnil;
23650 23654
23651 DEFVAR_BOOL ("auto-hscroll-mode", &automatic_hscrolling_p, 23655 DEFVAR_BOOL ("auto-hscroll-mode", &automatic_hscrolling_p,
diff --git a/src/xfns.c b/src/xfns.c
index a03573f7bf3..5610aa95e9d 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4942,19 +4942,22 @@ compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
4942 4942
4943 if (INTEGERP (top)) 4943 if (INTEGERP (top))
4944 *root_y = XINT (top); 4944 *root_y = XINT (top);
4945 else if (*root_y + XINT (dy) - height < 0) 4945 else if (*root_y + XINT (dy) <= 0)
4946 *root_y -= XINT (dy); 4946 *root_y = 0; /* Can happen for negative dy */
4947 else if (*root_y + XINT (dy) >= FRAME_X_DISPLAY_INFO (f)->height) 4947 else if (*root_y + XINT (dy) + height <= FRAME_X_DISPLAY_INFO (f)->height)
4948 /* Put tip above the pointer. */ 4948 /* It fits below the pointer */
4949 *root_y -= XINT (dy);
4950 else
4951 {
4952 *root_y -= height;
4953 *root_y += XINT (dy); 4949 *root_y += XINT (dy);
4954 } 4950 else if (height + XINT (dy) <= *root_y)
4951 /* It fits above the pointer. */
4952 *root_y -= height + XINT (dy);
4953 else
4954 /* Put it on the top. */
4955 *root_y = 0;
4955 4956
4956 if (INTEGERP (left)) 4957 if (INTEGERP (left))
4957 *root_x = XINT (left); 4958 *root_x = XINT (left);
4959 else if (*root_x + XINT (dx) <= 0)
4960 *root_x = 0; /* Can happen for negative dx */
4958 else if (*root_x + XINT (dx) + width <= FRAME_X_DISPLAY_INFO (f)->width) 4961 else if (*root_x + XINT (dx) + width <= FRAME_X_DISPLAY_INFO (f)->width)
4959 /* It fits to the right of the pointer. */ 4962 /* It fits to the right of the pointer. */
4960 *root_x += XINT (dx); 4963 *root_x += XINT (dx);
diff --git a/src/xmenu.c b/src/xmenu.c
index 5aae977ac9a..3fd88a7ac2f 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1584,6 +1584,15 @@ menubar_selection_callback (widget, client_data)
1584 if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f) 1584 if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f)
1585 return; 1585 return;
1586 1586
1587 /* For a group of radio buttons, GTK calls the selection callback first
1588 for the item that was active before the selection and then for the one that
1589 is active after the selection. For C-h k this means we get the help on
1590 the deselected item and then the selected item is executed. Prevent that
1591 by ignoring the non-active item. */
1592 if (GTK_IS_RADIO_MENU_ITEM (widget)
1593 && ! gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget)))
1594 return;
1595
1587 /* When a menu is popped down, X generates a focus event (i.e. focus 1596 /* When a menu is popped down, X generates a focus event (i.e. focus
1588 goes back to the frame below the menu). Since GTK buffers events, 1597 goes back to the frame below the menu). Since GTK buffers events,
1589 we force it out here before the menu selection event. Otherwise 1598 we force it out here before the menu selection event. Otherwise
@@ -1903,7 +1912,7 @@ update_submenu_strings (first_wv)
1903 { 1912 {
1904 if (STRINGP (wv->lname)) 1913 if (STRINGP (wv->lname))
1905 { 1914 {
1906 wv->name = SDATA (wv->lname); 1915 wv->name = (char *) SDATA (wv->lname);
1907 1916
1908 /* Ignore the @ that means "separate pane". 1917 /* Ignore the @ that means "separate pane".
1909 This is a kludge, but this isn't worth more time. */ 1918 This is a kludge, but this isn't worth more time. */
@@ -1916,7 +1925,7 @@ update_submenu_strings (first_wv)
1916 } 1925 }
1917 1926
1918 if (STRINGP (wv->lkey)) 1927 if (STRINGP (wv->lkey))
1919 wv->key = SDATA (wv->lkey); 1928 wv->key = (char *) SDATA (wv->lkey);
1920 1929
1921 if (wv->contents) 1930 if (wv->contents)
1922 update_submenu_strings (wv->contents); 1931 update_submenu_strings (wv->contents);