]> git.eshelyaron.com Git - emacs.git/commit
Various detailed fixes to minibuf.c, etc., to fix bug #48337
authorAlan Mackenzie <acm@muc.de>
Fri, 14 May 2021 15:52:21 +0000 (15:52 +0000)
committerAlan Mackenzie <acm@muc.de>
Fri, 14 May 2021 15:52:21 +0000 (15:52 +0000)
commit780b1db126fcfdbb50da5c1acf24b3c6e614dd9f
treed25c9beba857c62ecda5353a38a093f694a3f238
parent43701a84367b76ccc93ad46f89110486988eec10
Various detailed fixes to minibuf.c, etc., to fix bug #48337

Also fix some unsafe coding.

* lisp/window.el (push-window-buffer-onto-prev): New function, extracted from
(record-window-buffer): Refactor by extracting the above, and removing the now
redundant parameter DO-MINIBUF.

* src/minibuf.c (zip_minibuffer_stacks, read_minibuf): Replace calls to
get_minibuffer (0) by nth_minibuffer (0).  Replace calls to
Qrecord_window_buffer by calls to Qpush_window_buffer_onto_prev.
(Factive_minibuffer_window, read_minibuf_unwind): Call abort_emacs should an
"impossible" null value be returned by nth_minibuffer.
(read_minibuf): Move the get_minibuffer_call to just after the incrementation
of minibuf_level as a precaution against a missing buffer in
Vminibuffer_list.
(nth_minibuffer): Replace XCAR by Fcar, to allow (car nil) to work.
(init_minibuf_once): Create the inactive buffer  *Minibuf-0*.
(syms_of_minibuf): New DEFSYM, Qpush_window_buffer_onto_prev.

* src/window.c (restore_window_configuration): Replace some XCARs and XCDRs
by Fcar_safe and Fcdr_safe.
lisp/window.el
src/minibuf.c
src/window.c