summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-12-19 19:57:22 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-12-19 19:57:22 +0000
commite93b29568add51c918892153759a1fcd440e85be (patch)
tree4ca3494b355f5df3d0cdbe155eeaa3f630f293c1 /src
parent8d3cdf56502e89f00e86b02f24422acfa1b34beb (diff)
parent3031d8b0bb97f21c79b3022ff3e7564173facd18 (diff)
downloademacs-e93b29568add51c918892153759a1fcd440e85be.tar.gz
emacs-e93b29568add51c918892153759a1fcd440e85be.tar.bz2
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
# stdio stop working and therefore the `pr' command above as well.
break abort
+# The MS-Windows build replaces abort with its own function.
+break w32_abort
+
# If we are running in synchronous mode, we want a chance to look around
# before Emacs exits. Perhaps we should put the break somewhere else
# instead...
diff --git a/src/ChangeLog b/src/ChangeLog
index 4994e7e8d6a..275477a765f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,92 @@
+2005-12-17 Eli Zaretskii <eliz@gnu.org>
+
+ * makefile.w32-in (bootstrap-temacs): Warn that parts of commands
+ enclosed in $(ARGQUOTE)s should not be split between two lines, as
+ that will break with GNU Make >3.80, when sh.exe is used and
+ arg quoting is with '..'.
+
+2005-12-17 Chong Yidong <cyd@stupidchicken.com>
+
+ * print.c (print_preprocess): Just signal an error if print_depth
+ is exceeded.
+
+2005-12-17 Eli Zaretskii <eliz@gnu.org>
+
+ * .gdbinit: Set a breakpoint on w32_abort.
+
+2005-12-16 Juri Linkov <juri@jurta.org>
+
+ * minibuf.c (Fminibuffer_completion_contents): New Lisp function
+ created from minibuffer_completion_contents.
+ (minibuffer_completion_contents): Remove.
+ (do_completion, Fminibuffer_complete_word)
+ (Fminibuffer_completion_help): Replace minibuffer_completion_contents
+ with Fminibuffer_completion_contents.
+ (syms_of_minibuf): Add Sminibuffer_completion_contents.
+ (Fdisplay_completion_list): Doc fix.
+ (display_completion_list_1): Use `nil' for second arg of
+ `Fdisplay_completion_list'.
+
+2005-12-14 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * xfns.c (compute_tip_xy): Handle negative dx and dy.
+
+ * w32fns.c (compute_tip_xy): Ditto
+
+ * macfns.c (compute_tip_xy): Ditto
+
+2005-12-14 Chong Yidong <cyd@stupidchicken.com>
+
+ * print.c (print_preprocess): Go to a deeper print_depth to avoid
+ print_object loop.
+
+2005-12-14 Kyotaro HORIGUCHI <horiguti@meadowy.org> (tiny change)
+
+ * coding.c (code_convert_region_unwind): GCPRO arg.
+
+2005-12-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * xfns.c (compute_tip_xy): Calculate root_y the same way as root_x,
+ i.e. dy is offset from top of frame instead of bottom.
+
+ * macfns.c (compute_tip_xy): Ditto.
+
+ * w32fns.c (compute_tip_xy): Ditto.
+
+ * gtkutil.c (SSDATA): New macro to remove compiler warnings.
+ (xg_get_image_for_pixmap, xg_create_frame_widgets)
+ (xg_get_file_with_chooser): Use SSDATA instead of SDATA.
+
+ * xmenu.c (menubar_selection_callback): Do nothing if the callback
+ is for an unselected radio menu item.
+
+2005-12-11 Richard M. Stallman <rms@gnu.org>
+
+ * xdisp.c (syms_of_xdisp) <blink-cursor-alist>: Doc fix.
+
+ * lisp.h [! NO_UNION_TYPE] (EQ): Use == so args are computed just once.
+
+ * keymap.c (Fset_keymap_parent, store_in_keymap): Use CHECK_IMPURE.
+ (Flookup_key): Doc fix.
+ (syms_of_keymap) <function-key-map>: Doc fix.
+
+ * fns.c (Frequire): Treat evaluating from a source file
+ like loading the file.
+
+ * floatfns.c (Flog): Doc fix.
+
+ * fileio.c (Finsert_file_contents): Set Vdeactivate_mark
+ when we change the buffer.
+
+2005-12-11 Juri Linkov <juri@jurta.org>
+
+ * minibuf.c (display_completion_list_1):
+ Call `minibuffer_completion_contents' instead of using `nil' as
+ second arg of `Fdisplay_completion_list'.
+ (keys_of_minibuf): Unbind SPC in
+ Vminibuffer_local_filename_completion_map (see also related
+ change on 2005-12-06).
+
2005-12-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* 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 ()
/* Return 1 if OBJ is a valid lisp object.
Return 0 if OBJ is NOT a valid lisp object.
Return -1 if we cannot validate OBJ.
-*/
+ This function can be quite slow,
+ so it should only be used in code for manual debugging. */
int
valid_lisp_object_p (obj)
@@ -4526,11 +4527,11 @@ valid_lisp_object_p (obj)
trying), so we trick the o/s to tell us whether p is a valid
pointer. Unfortunately, we cannot use NULL_DEVICE here, as
emacs_write may not validate p in that case. */
- if ((fd = emacs_open("__Valid__Lisp__Object__", O_CREAT | O_WRONLY | O_TRUNC, 0666)) >= 0)
+ if ((fd = emacs_open ("__Valid__Lisp__Object__", O_CREAT | O_WRONLY | O_TRUNC, 0666)) >= 0)
{
- int valid = emacs_write(fd, (char *)p, 16) == 16;
- emacs_close(fd);
- unlink("__Valid__Lisp__Object__");
+ int valid = (emacs_write (fd, (char *)p, 16) == 16);
+ emacs_close (fd);
+ unlink ("__Valid__Lisp__Object__");
return valid;
}
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
code_convert_region_unwind (arg)
Lisp_Object arg;
{
+ struct gcpro gcpro1;
+ GCPRO1 (arg);
+
inhibit_pre_post_conversion = 0;
Vlast_coding_system_used = XCAR (arg);
for (arg = XCDR (arg); ! NILP (arg); arg = XCDR (arg))
Fkill_buffer (XCAR (arg));
+
+ UNGCPRO;
return Qnil;
}
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. */)
#endif
Vdeactivate_mark = old_Vdeactivate_mark;
}
+ else
+ Vdeactivate_mark = Qt;
/* Make the text read part of the buffer. */
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,
DEFUN ("log", Flog, Slog, 1, 2, 0,
doc: /* Return the natural logarithm of ARG.
-If second optional argument BASE is given, return log ARG using that base. */)
+If the optional argument BASE is given, return log ARG using that base. */)
(arg, base)
register Lisp_Object arg, base;
{
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. */)
{
register Lisp_Object tem;
struct gcpro gcpro1, gcpro2;
+ int from_file = load_in_progress;
CHECK_SYMBOL (feature);
/* Record the presence of `require' in this file
even if the feature specified is already loaded.
But not more than once in any file,
- and not when we aren't loading a file. */
- if (load_in_progress)
+ and not when we aren't loading or reading from a file. */
+ if (!from_file)
+ for (tem = Vcurrent_load_list; CONSP (tem); tem = XCDR (tem))
+ if (NILP (XCDR (tem)) && STRINGP (XCAR (tem)))
+ from_file = 1;
+
+ if (from_file)
{
tem = Fcons (Qrequire, feature);
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. */
#define FRAME_TOTAL_PIXEL_HEIGHT(f) \
(FRAME_PIXEL_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
+/* Avoid "differ in sign" warnings */
+#define SSDATA(x) ((char *) SDATA (x))
+
/***********************************************************************
Display handling functions
@@ -347,9 +350,9 @@ xg_get_image_for_pixmap (f, img, widget, old_widget)
xassert (STRINGP (file) != 0);
if (! old_widget)
- old_widget = GTK_IMAGE (gtk_image_new_from_file (SDATA (file)));
+ old_widget = GTK_IMAGE (gtk_image_new_from_file (SSDATA (file)));
else
- gtk_image_set_from_file (old_widget, SDATA (file));
+ gtk_image_set_from_file (old_widget, SSDATA (file));
UNGCPRO;
return GTK_WIDGET (old_widget);
@@ -735,11 +738,11 @@ xg_create_frame_widgets (f)
/* Use same names as the Xt port does. I.e. Emacs.pane.emacs by default */
gtk_widget_set_name (wtop, EMACS_CLASS);
gtk_widget_set_name (wvbox, "pane");
- gtk_widget_set_name (wfixed, SDATA (Vx_resource_name));
+ gtk_widget_set_name (wfixed, SSDATA (Vx_resource_name));
/* If this frame has a title or name, set it in the title bar. */
- if (! NILP (f->title)) title = SDATA (ENCODE_UTF_8 (f->title));
- else if (! NILP (f->name)) title = SDATA (ENCODE_UTF_8 (f->name));
+ if (! NILP (f->title)) title = SSDATA (ENCODE_UTF_8 (f->title));
+ else if (! NILP (f->name)) title = SSDATA (ENCODE_UTF_8 (f->name));
if (title) gtk_window_set_title (GTK_WINDOW (wtop), title);
@@ -780,8 +783,8 @@ xg_create_frame_widgets (f)
can't shrink the window from its starting size. */
gtk_window_set_policy (GTK_WINDOW (wtop), TRUE, TRUE, TRUE);
gtk_window_set_wmclass (GTK_WINDOW (wtop),
- SDATA (Vx_resource_name),
- SDATA (Vx_resource_class));
+ SSDATA (Vx_resource_name),
+ SSDATA (Vx_resource_class));
/* Add callback to do nothing on WM_DELETE_WINDOW. The default in
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,
if (default_filename[0] != '/')
file = Fexpand_file_name (file, Qnil);
- default_filename = SDATA (file);
+ default_filename = SSDATA (file);
if (Ffile_directory_p (file))
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filewin),
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)
and SYMBOL is its name.
`system-key-alist' has a separate binding for each display device.
-See Info node `(elisp)Multiple displays'.
-
-Note that the currently selected frame has very little to do with
-which binding of this variable is active at any given moment. If you
-need set or get the binding on a specific display, use
-`terminal-local-value' and `set-terminal-local-value'. */);
+See Info node `(elisp)Multiple displays'. */);
DEFVAR_KBOARD ("local-function-key-map", Vlocal_function_key_map,
- doc: /* Keymap mapping ASCII function key sequences onto their preferred forms.
-This allows Emacs to recognize function keys sent from ASCII
-terminals at any point in a key sequence.
+ doc: /* Keymap that translates key sequences to key sequences during input.
+This is used mainly for mapping ASCII function key sequences into
+real Emacs function key events (symbols).
The `read-key-sequence' function replaces any subsequence bound by
`local-function-key-map' with its binding. More precisely, when the
@@ -11618,12 +11613,7 @@ typing `ESC O P x' would return [f1 x].
device. See Info node `(elisp)Multiple displays'. If you need to
define a binding on all display devices, change `function-key-map'
instead. Initially, `local-function-key-map' is an empty keymap that
-has `function-key-map' as its parent on all display devices.
-
-Note that the currently selected frame has very little to do with
-which binding of this variable is active at any given moment. If you
-need set or get the binding on a specific display, use
-`terminal-local-value' and `set-terminal-local-value'. */);
+has `function-key-map' as its parent on all display devices. */);
DEFVAR_LISP ("function-key-map", &Vfunction_key_map,
doc: /* The parent keymap of all `local-function-key-map' instances.
@@ -11640,12 +11630,7 @@ and its non-prefix bindings override ordinary bindings.
`key-translation-map' has a separate binding for each display device.
(See Info node `(elisp)Multiple displays'.) If you need to set a key
-translation on all devices, change `global-key-translation-map' instead.
-
-Note that the currently selected frame has very little to do with
-which binding of this variable is active at any given moment. If you
-need set or get the binding on a specific display, use
-`terminal-local-value' and `set-terminal-local-value'. */);
+translation on all devices, change `global-key-translation-map' instead. */);
DEFVAR_LISP ("key-translation-map", &Vkey_translation_map,
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. */)
if (EQ (XCDR (prev), parent))
RETURN_UNGCPRO (parent);
+ CHECK_IMPURE (prev);
XSETCDR (prev, parent);
break;
}
@@ -906,6 +907,7 @@ store_in_keymap (keymap, idx, def)
{
if (NATNUMP (idx) && XFASTINT (idx) < ASIZE (elt))
{
+ CHECK_IMPURE (elt);
ASET (elt, XFASTINT (idx), def);
return def;
}
@@ -931,6 +933,7 @@ store_in_keymap (keymap, idx, def)
{
if (EQ (idx, XCAR (elt)))
{
+ CHECK_IMPURE (elt);
XSETCDR (elt, def);
return def;
}
@@ -948,6 +951,7 @@ store_in_keymap (keymap, idx, def)
keymap_end:
/* We have scanned the entire keymap, and not found a binding for
IDX. Let's add one. */
+ CHECK_IMPURE (insertion_point);
XSETCDR (insertion_point,
Fcons (Fcons (idx, def), XCDR (insertion_point)));
}
@@ -1210,7 +1214,7 @@ A number as value means KEY is "too long";
that is, characters or symbols in it except for the last one
fail to be a valid sequence of prefix characters in KEYMAP.
The number is how many characters at the front of KEY
-it takes to reach a non-prefix command.
+it takes to reach a non-prefix key.
Normally, `lookup-key' ignores bindings for t, which act as default
bindings, 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
extern Lisp_Object make_number P_ ((EMACS_INT));
#endif
-#define EQ(x, y) ((x).s.val == (y).s.val && (x).s.type == (y).s.type)
+#define EQ(x, y) ((x).i == (y).i)
#endif /* NO_UNION_TYPE */
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)
if (INTEGERP (top))
*root_y = XINT (top);
- else if (*root_y + XINT (dy) - height < 0)
- *root_y -= XINT (dy);
+ else if (*root_y + XINT (dy) <= 0)
+ *root_y = 0; /* Can happen for negative dy */
+ else if (*root_y + XINT (dy) + height <= FRAME_MAC_DISPLAY_INFO (f)->height)
+ /* It fits below the pointer */
+ *root_y += XINT (dy);
+ else if (height + XINT (dy) <= *root_y)
+ /* It fits above the pointer. */
+ *root_y -= height + XINT (dy);
else
- {
- *root_y -= height;
- *root_y += XINT (dy);
- }
+ /* Put it on the top. */
+ *root_y = 0;
if (INTEGERP (left))
*root_x = XINT (left);
+ else if (*root_x + XINT (dx) <= 0)
+ *root_x = 0; /* Can happen for negative dx */
else if (*root_x + XINT (dx) + width <= FRAME_MAC_DISPLAY_INFO (f)->width)
/* It fits to the right of the pointer. */
*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
# Build a temacs with a sufficiently large PURESIZE to load the
# Lisp files from loadup.el in source form.
#
+# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
+# this can break with GNU Make 3.81 and later if sh.exe is used.
bootstrap-temacs:
$(MAKE) $(MFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE)
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. */)
return make_buffer_string (prompt_end, ZV, 0);
}
+DEFUN ("minibuffer-completion-contents", Fminibuffer_completion_contents,
+ Sminibuffer_completion_contents, 0, 0, 0,
+ doc: /* Return the user input in a minibuffer before point as a string.
+That is what completion commands operate on.
+The current buffer must be a minibuffer. */)
+ ()
+{
+ int prompt_end = XINT (Fminibuffer_prompt_end ());
+ if (PT < prompt_end)
+ error ("Cannot do completion in the prompt");
+ return make_buffer_string (prompt_end, PT, 1);
+}
+
DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents,
Sdelete_minibuffer_contents, 0, 0, 0,
doc: /* Delete all user input in a minibuffer.
@@ -401,17 +414,6 @@ The current buffer must be a minibuffer. */)
return Qnil;
}
-/* Get the text in the minibuffer before point.
- That is what completion commands operate on. */
-
-Lisp_Object
-minibuffer_completion_contents ()
-{
- int prompt_end = XINT (Fminibuffer_prompt_end ());
- if (PT < prompt_end)
- error ("Cannot do completion in the prompt");
- return make_buffer_string (prompt_end, PT, 1);
-}
/* Read from the minibuffer using keymap MAP and initial contents INITIAL,
putting point minus BACKUP_N bytes from the end of INITIAL,
@@ -1905,7 +1907,7 @@ do_completion ()
Lisp_Object last;
struct gcpro gcpro1, gcpro2;
- completion = Ftry_completion (minibuffer_completion_contents (),
+ completion = Ftry_completion (Fminibuffer_completion_contents (),
Vminibuffer_completion_table,
Vminibuffer_completion_predicate);
last = last_exact_completion;
@@ -1927,7 +1929,7 @@ do_completion ()
return 1;
}
- string = minibuffer_completion_contents ();
+ string = Fminibuffer_completion_contents ();
/* COMPLETEDP should be true if some completion was done, which
doesn't include simply changing the case of the entered string.
@@ -1994,7 +1996,7 @@ do_completion ()
last_exact_completion = completion;
if (!NILP (last))
{
- tem = minibuffer_completion_contents ();
+ tem = Fminibuffer_completion_contents ();
if (!NILP (Fequal (tem, last)))
Fminibuffer_completion_help ();
}
@@ -2197,7 +2199,7 @@ Return nil if there is no valid completion, else t. */)
/* We keep calling Fbuffer_string rather than arrange for GC to
hold onto a pointer to one of the strings thus made. */
- completion = Ftry_completion (minibuffer_completion_contents (),
+ completion = Ftry_completion (Fminibuffer_completion_contents (),
Vminibuffer_completion_table,
Vminibuffer_completion_predicate);
if (NILP (completion))
@@ -2229,7 +2231,7 @@ Return nil if there is no valid completion, else t. */)
int buffer_nchars, completion_nchars;
CHECK_STRING (completion);
- tem = minibuffer_completion_contents ();
+ tem = Fminibuffer_completion_contents ();
GCPRO2 (completion, tem);
/* If reading a file name,
expand any $ENVVAR refs in the buffer and in TEM. */
@@ -2293,7 +2295,7 @@ Return nil if there is no valid completion, else t. */)
if (i == SCHARS (completion))
{
GCPRO1 (completion);
- tem = Ftry_completion (concat2 (minibuffer_completion_contents (),
+ tem = Ftry_completion (concat2 (Fminibuffer_completion_contents (),
build_string (" ")),
Vminibuffer_completion_table,
Vminibuffer_completion_predicate);
@@ -2305,7 +2307,7 @@ Return nil if there is no valid completion, else t. */)
{
GCPRO1 (completion);
tem =
- Ftry_completion (concat2 (minibuffer_completion_contents (),
+ Ftry_completion (concat2 (Fminibuffer_completion_contents (),
build_string ("-")),
Vminibuffer_completion_table,
Vminibuffer_completion_predicate);
@@ -2377,8 +2379,8 @@ The optional second arg COMMON-SUBSTRING is a string.
It is used to put faces, `completions-first-difference' and
`completions-common-part' on the completion buffer. The
`completions-common-part' face is put on the common substring
-specified by COMMON-SUBSTRING. If COMMON-SUBSTRING is nil,
-the faces are not put.
+specified by COMMON-SUBSTRING. If COMMON-SUBSTRING is nil
+and the current buffer is not the minibuffer, the faces are not put.
Internally, COMMON-SUBSTRING is bound to `completion-common-substring'
during running `completion-setup-hook'. */)
(completions, common_substring)
@@ -2580,7 +2582,7 @@ DEFUN ("minibuffer-completion-help", Fminibuffer_completion_help, Sminibuffer_co
Lisp_Object completions;
message ("Making completion list...");
- completions = Fall_completions (minibuffer_completion_contents (),
+ completions = Fall_completions (Fminibuffer_completion_contents (),
Vminibuffer_completion_table,
Vminibuffer_completion_predicate,
Qt);
@@ -2889,6 +2891,7 @@ properties. */);
defsubr (&Sminibuffer_prompt_end);
defsubr (&Sminibuffer_contents);
defsubr (&Sminibuffer_contents_no_properties);
+ defsubr (&Sminibuffer_completion_contents);
defsubr (&Sdelete_minibuffer_contents);
defsubr (&Stry_completion);
@@ -2940,8 +2943,8 @@ keys_of_minibuf ()
initial_define_key (Vminibuffer_local_must_match_map, Ctl ('j'),
"minibuffer-complete-and-exit");
- initial_define_key (Vminibuffer_local_must_match_filename_map, ' ',
- "self-insert-command");
+ Fdefine_key (Vminibuffer_local_must_match_filename_map,
+ build_string (" "), Qnil);
}
/* 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)
/* Give up if we go so deep that print_object will get an error. */
/* See similar code in print_object. */
if (print_depth >= PRINT_CIRCLE)
- return;
+ error ("Apparently circular structure being printed");
/* Avoid infinite recursion for circular nested structure
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)
if (INTEGERP (top))
*root_y = XINT (top);
- else if (*root_y + XINT (dy) - height < 0)
- *root_y -= XINT (dy);
- /* If there's not enough place below the pointer, put tip above it. */
- else if (*root_y + XINT (dy) >= FRAME_W32_DISPLAY_INFO (f)->height)
- *root_y -= XINT (dy);
- else
- {
- *root_y -= height;
+ else if (*root_y + XINT (dy) <= 0)
+ *root_y = 0; /* Can happen for negative dy */
+ else if (*root_y + XINT (dy) + height <= FRAME_W32_DISPLAY_INFO (f)->height)
+ /* It fits below the pointer */
*root_y += XINT (dy);
- }
+ else if (height + XINT (dy) <= *root_y)
+ /* It fits above the pointer. */
+ *root_y -= height + XINT (dy);
+ else
+ /* Put it on the top. */
+ *root_y = 0;
if (INTEGERP (left))
*root_x = XINT (left);
+ else if (*root_x + XINT (dx) <= 0)
+ *root_x = 0; /* Can happen for negative dx */
else if (*root_x + XINT (dx) + width <= FRAME_W32_DISPLAY_INFO (f)->width)
/* It fits to the right of the pointer. */
*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. */);
Each element has the form (ON-STATE . OFF-STATE). Whenever the
`cursor-type' frame-parameter or variable equals ON-STATE,
comparing using `equal', Emacs uses OFF-STATE to specify
-how to blink it off. */);
+how to blink it off. ON-STATE and OFF-STATE are values for
+the `cursor-type' frame parameter.
+
+If a frame's ON-STATE has no entry in this list,
+the frame's other specifications determine how to blink the cursor off. */);
Vblink_cursor_alist = Qnil;
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)
if (INTEGERP (top))
*root_y = XINT (top);
- else if (*root_y + XINT (dy) - height < 0)
- *root_y -= XINT (dy);
- else if (*root_y + XINT (dy) >= FRAME_X_DISPLAY_INFO (f)->height)
- /* Put tip above the pointer. */
- *root_y -= XINT (dy);
- else
- {
- *root_y -= height;
+ else if (*root_y + XINT (dy) <= 0)
+ *root_y = 0; /* Can happen for negative dy */
+ else if (*root_y + XINT (dy) + height <= FRAME_X_DISPLAY_INFO (f)->height)
+ /* It fits below the pointer */
*root_y += XINT (dy);
- }
+ else if (height + XINT (dy) <= *root_y)
+ /* It fits above the pointer. */
+ *root_y -= height + XINT (dy);
+ else
+ /* Put it on the top. */
+ *root_y = 0;
if (INTEGERP (left))
*root_x = XINT (left);
+ else if (*root_x + XINT (dx) <= 0)
+ *root_x = 0; /* Can happen for negative dx */
else if (*root_x + XINT (dx) + width <= FRAME_X_DISPLAY_INFO (f)->width)
/* It fits to the right of the pointer. */
*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)
if (! cb_data || ! cb_data->cl_data || ! cb_data->cl_data->f)
return;
+ /* For a group of radio buttons, GTK calls the selection callback first
+ for the item that was active before the selection and then for the one that
+ is active after the selection. For C-h k this means we get the help on
+ the deselected item and then the selected item is executed. Prevent that
+ by ignoring the non-active item. */
+ if (GTK_IS_RADIO_MENU_ITEM (widget)
+ && ! gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget)))
+ return;
+
/* When a menu is popped down, X generates a focus event (i.e. focus
goes back to the frame below the menu). Since GTK buffers events,
we force it out here before the menu selection event. Otherwise
@@ -1903,7 +1912,7 @@ update_submenu_strings (first_wv)
{
if (STRINGP (wv->lname))
{
- wv->name = SDATA (wv->lname);
+ wv->name = (char *) SDATA (wv->lname);
/* Ignore the @ that means "separate pane".
This is a kludge, but this isn't worth more time. */
@@ -1916,7 +1925,7 @@ update_submenu_strings (first_wv)
}
if (STRINGP (wv->lkey))
- wv->key = SDATA (wv->lkey);
+ wv->key = (char *) SDATA (wv->lkey);
if (wv->contents)
update_submenu_strings (wv->contents);