Commit e10bd9e2 authored by Paul Eggert's avatar Paul Eggert
Browse files

Merge from origin/emacs-27

44c0e074 * doc/emacs/buffers.texi (Icomplete): Mention icomplete-mi...
68b6dad1 Be more aggressive in marking objects during GC
36f508f5 ; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo.
cc340da1 Fix bug #41618 "(byte-compile 'foo) errors when foo is a m...
41232e67 Avoid crashes due to bidi cache being reset during redisplay
f72bb4ce * lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize ...
d3e0023a ; * etc/TODO: Fix formatting.  (Bug#41497)
a8ad94cd Fix mingw.org's MinGW GCC 9 warning about 'execve'

# Conflicts:
#	lisp/tab-bar.el
#	nt/inc/ms-w32.h
#	src/alloc.c
parents 2c1e5b9e 44c0e074
......@@ -741,7 +741,14 @@ Ido''). Among other things, in Fido mode, @kbd{C-s} and @kbd{C-r} are
also used to rotate the completions list, @kbd{C-k} can be used to
delete files and kill buffers in-list. Another noteworthy aspect is
that @code{flex} is used as the default completion style
(@pxref{Completion Styles}).
(@pxref{Completion Styles}). To change this, add the following to
your initialization file (@pxref{Init File}):
@example
(defun my-icomplete-styles ()
(setq-local completion-styles '(initials flex)))
(add-hook 'icomplete-minibuffer-setup-hook 'my-icomplete-styles)
@end example
To enable Fido mode, type @kbd{M-x fido-mode}, or customize
the variable @code{fido-mode} to @code{t} (@pxref{Easy
......
This diff is collapsed.
......@@ -2755,14 +2755,15 @@ If FORM is a lambda or a macro, byte-compile it as a function."
;; Expand macros.
(setq fun (byte-compile-preprocess fun))
(setq fun (byte-compile-top-level fun nil 'eval))
(if macro (push 'macro fun))
(if (symbolp form)
;; byte-compile-top-level returns an *expression* equivalent to the
;; `fun' expression, so we need to evaluate it, tho normally
;; this is not needed because the expression is just a constant
;; byte-code object, which is self-evaluating.
(fset form (eval fun t))
fun)))))))
(setq fun (eval fun t)))
(if macro (push 'macro fun))
(if (symbolp form) (fset form fun))
fun))))))
(defun byte-compile-sexp (sexp)
"Compile and return SEXP."
......
......@@ -1554,7 +1554,8 @@ indirectly called by the latter."
Like \\[switch-to-buffer-other-frame] (which see), but creates a new tab."
(interactive
(list (read-buffer-to-switch "Switch to buffer in other tab: ")))
(display-buffer buffer-or-name '((display-buffer-in-tab)
(display-buffer (window-normalize-buffer-to-switch-to buffer-or-name)
'((display-buffer-in-tab)
(inhibit-same-window . nil)
(reusable-frames . t))
norecord))
......
......@@ -4687,35 +4687,6 @@ mark_maybe_objects (Lisp_Object const *array, ptrdiff_t nelts)
mark_maybe_object (*array);
}
/* A lower bound on the alignment of Lisp objects that need marking.
Although 1 is safe, higher values speed up mark_maybe_pointer.
If USE_LSB_TAG, this value is typically GCALIGNMENT; otherwise,
it's determined by the natural alignment of Lisp structs.
All vectorlike objects have alignment at least that of union
vectorlike_header and it's unlikely they all have alignment greater,
so use the union as a safe and likely-accurate standin for
vectorlike objects. */
enum { GC_OBJECT_ALIGNMENT_MINIMUM
= max (GCALIGNMENT,
min (alignof (union vectorlike_header),
min (min (alignof (struct Lisp_Cons),
alignof (struct Lisp_Float)),
min (alignof (struct Lisp_String),
alignof (struct Lisp_Symbol))))) };
/* Return true if P might point to Lisp data that can be garbage
collected, and false otherwise (i.e., false if it is easy to see
that P cannot point to Lisp data that can be garbage collected).
Symbols are implemented via offsets not pointers, but the offsets
are also multiples of GC_OBJECT_ALIGNMENT_MINIMUM. */
static bool
maybe_lisp_pointer (void *p)
{
return (uintptr_t) p % GC_OBJECT_ALIGNMENT_MINIMUM == 0;
}
/* If P points to Lisp data, mark that as live if it isn't already
marked. */
......@@ -4728,9 +4699,6 @@ mark_maybe_pointer (void *p)
VALGRIND_MAKE_MEM_DEFINED (&p, sizeof (p));
#endif
if (!maybe_lisp_pointer (p))
return;
if (pdumper_object_p (p))
{
int type = pdumper_find_object_type (p);
......@@ -4830,7 +4798,16 @@ mark_memory (void const *start, void const *end)
for (pp = start; (void const *) pp < end; pp += GC_POINTER_ALIGNMENT)
{
mark_maybe_pointer (*(void *const *) pp);
char *p = *(char *const *) pp;
mark_maybe_pointer (p);
/* Unmask any struct Lisp_Symbol pointer that make_lisp_symbol
previously disguised by adding the address of 'lispsym'.
On a host with 32-bit pointers and 64-bit Lisp_Objects,
a Lisp_Object might be split into registers saved into
non-adjacent words and P might be the low-order word's value. */
p += (intptr_t) lispsym;
mark_maybe_pointer (p);
verify (alignof (Lisp_Object) % GC_POINTER_ALIGNMENT == 0);
if (alignof (Lisp_Object) == GC_POINTER_ALIGNMENT
......
......@@ -11575,7 +11575,9 @@ display_echo_area_1 (ptrdiff_t a1, Lisp_Object a2)
/* Display. */
clear_glyph_matrix (w->desired_matrix);
XSETWINDOW (window, w);
void *itdata = bidi_shelve_cache ();
try_window (window, start, 0);
bidi_unshelve_cache (itdata, false);
 
return window_height_changed_p;
}
......@@ -19748,7 +19750,7 @@ find_last_row_displaying_text (struct glyph_matrix *matrix, struct it *it,
by changes at the start of current_buffer that occurred since W's
current matrix was built. Value is null if no such row exists.
 
BEG_UNCHANGED us the number of characters unchanged at the start of
BEG_UNCHANGED is the number of characters unchanged at the start of
current_buffer. BEG + BEG_UNCHANGED is the buffer position of the
first changed character in current_buffer. Characters at positions <
BEG + BEG_UNCHANGED are at the same buffer positions as they were
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment