commit b00796ee36bb2ecc9a853ef97e4b7f8174e4e3b8 (HEAD, refs/remotes/origin/master) Author: Daniel Semyonov Date: Sat May 1 17:03:07 2021 +0300 Mairix: use 'mairix-search-options' as documented * lisp/net/mairix.el (mairix-call-mairix): Append 'mairix-search-options' to the arguments passed to mairix. Copyright-paperwork-exempt: yes diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el index adc41b6068..e1d35c2a85 100644 --- a/lisp/net/mairix.el +++ b/lisp/net/mairix.el @@ -531,8 +531,11 @@ The mail program is given by `mairix-mail-program'." If FILE is nil, use default. If THREADS is non-nil, also return whole threads. Function returns t if messages were found." (let* ((commandsplit (split-string mairix-command)) - (args (cons (car commandsplit) - `(nil ,(get-buffer-create mairix-output-buffer) nil))) + (args (cons + (car commandsplit) + (append + `(nil ,(get-buffer-create mairix-output-buffer) nil) + mairix-search-options))) rval) (with-current-buffer mairix-output-buffer (erase-buffer)) commit b1ac6797c551e5328cfee509c168afe550235d2a Author: Daniel Semyonov Date: Sat May 1 17:01:22 2021 +0300 Mairix: autoload main interactive functions * lisp/net/mairix.el (mairix-search, mairix-use-saved-search) (mairix-edit-saved-searches-customize, mairix-search-from-this-article) (mairix-search-thread-this-article, mairix-widget-search-based-on-article) (mairix-edit-saved-searches, mairix-widget-search, mairix-update-database): Add magic autoload comment. Copyright-paperwork-exempt: yes diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el index 024d118f2d..adc41b6068 100644 --- a/lisp/net/mairix.el +++ b/lisp/net/mairix.el @@ -328,6 +328,7 @@ Currently there are `threads' and `flags'.") ;;;; Main interactive functions +;;;###autoload (defun mairix-search (search threads) "Call Mairix with SEARCH. If THREADS is non-nil, also display whole threads of found @@ -342,6 +343,7 @@ messages. Results will be put into the default search file." threads) (mairix-show-folder mairix-search-file))) +;;;###autoload (defun mairix-use-saved-search () "Use a saved search for querying Mairix." (interactive) @@ -374,6 +376,7 @@ Overwrite existing entry? ") (setcdr (assoc name mairix-saved-searches) mairix-last-search)))) (mairix-select-save)) +;;;###autoload (defun mairix-edit-saved-searches-customize () "Edit the list of saved searches in a customization buffer." (interactive) @@ -386,6 +389,8 @@ in your .emacs by pressing `Save for Future Sessions'.\n" (make-string 65 ?=) "\n"))) (autoload 'mail-strip-quoted-names "mail-utils") + +;;;###autoload (defun mairix-search-from-this-article (threads) "Search messages from sender of the current article. This is effectively a shortcut for calling `mairix-search' with @@ -402,6 +407,7 @@ threads." threads) (error "No function for obtaining mail header specified")))) +;;;###autoload (defun mairix-search-thread-this-article () "Search thread for the current article. This is effectively a shortcut for calling `mairix-search' @@ -423,12 +429,14 @@ with m:msgid of the current article and enabled threads." (mairix-search (format "m:%s" mid) t))) +;;;###autoload (defun mairix-widget-search-based-on-article () "Create mairix query based on current article using widgets." (interactive) (mairix-widget-search (mairix-widget-get-values))) +;;;###autoload (defun mairix-edit-saved-searches () "Edit current mairix searches." (interactive) @@ -441,6 +449,7 @@ with m:msgid of the current article and enabled threads." (defvar mairix-widgets) +;;;###autoload (defun mairix-widget-search (&optional mvalues) "Create mairix query interactively using graphical widgets. MVALUES may contain values from current article." @@ -470,6 +479,7 @@ MVALUES may contain values from current article." (widget-setup) (goto-char (point-min))) +;;;###autoload (defun mairix-update-database () "Call mairix for updating the database for SERVERS. Mairix will be called asynchronously unless commit 63d259cc0da6b3a464b1efe76bb17033de98aef9 Author: Eli Zaretskii Date: Sat May 15 11:06:41 2021 +0300 Improve doc string of 'log-edit-generate-changelog-from-diff' * lisp/vc/log-edit.el (log-edit-generate-changelog-from-diff): Improve the doc string. (Bug#48269) diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index f115a91a17..4a44787bb0 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -797,11 +797,15 @@ to build the Fixes: header.") (declare-function diff-add-log-current-defuns "diff-mode" ()) (defun log-edit-generate-changelog-from-diff () - "Insert a VC commit log message by looking at the current diff. -This command is intended to be uses on the \"*vc-log*\" buffer. -This command will generate a ChangeLog entries listing the -changed functions. You can then add a description where needed, -and use \\[fill-paragraph] to join consecutive function names." + "Insert a VC commit log message by looking at the current diffs. +This command is intended to be used in the \"*vc-log*\" buffer. +This command will generate ChangeLog entries listing the modified +files and functions changed in those files, based on the diffs +you are about to commit. You can then add a description for each +change where needed, and use \\[fill-paragraph] to join consecutive function +names into a single entry where they all share the same description. +Should you need to look at the diffs themselves, they can be found +in the \"*vc-diff*\" buffer produced by this command." (interactive) (change-log-insert-entries (with-current-buffer commit c18403302df3f07a7f94c3984d65b808fb40e8c1 Author: Martin Rudalics Date: Sat May 15 09:20:50 2021 +0200 Have X builds handle VisibilityNotify events (Bug#48268, Bug#48413) * src/xterm.c (handle_one_xevent): Handle VisibilityNotify events (Bug#48268, Bug#48413). diff --git a/src/xterm.c b/src/xterm.c index bdf0804f89..1887c3255d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9343,6 +9343,11 @@ handle_one_xevent (struct x_display_info *dpyinfo, goto OTHER; case VisibilityNotify: + f = x_top_window_to_frame (dpyinfo, event->xvisibility.window); + if (f && (event->xvisibility.state == VisibilityUnobscured + || event->xvisibility.state == VisibilityPartiallyObscured)) + SET_FRAME_VISIBLE (f, 1); + goto OTHER; case MappingNotify: commit 48b37c3ef0cf272ec33406d95e7afb6d0e1b9d39 Author: Dmitry Gutov Date: Sat May 15 04:18:42 2021 +0300 Add :company-kind support to nxml-mode completion * lisp/nxml/rng-nxml.el (rng-complete-tag) (rng-complete-attribute-name, rng-complete-attribute-value): Support :company-kind. diff --git a/lisp/nxml/rng-nxml.el b/lisp/nxml/rng-nxml.el index 33768a46c9..d70a346159 100644 --- a/lisp/nxml/rng-nxml.el +++ b/lisp/nxml/rng-nxml.el @@ -179,7 +179,8 @@ Validation will be enabled if `rng-nxml-auto-validate-flag' is non-nil." ;; attributes are required (insert " ")))) ((member completion extra-strings) - (insert ">"))))))))) + (insert ">")))) + :company-kind ,(lambda () 'property)))))) (defconst rng-in-end-tag-name-regex (replace-regexp-in-string @@ -254,7 +255,8 @@ Validation will be enabled if `rng-nxml-auto-validate-flag' is non-nil." (when (and (eq status 'finished) (not (looking-at "="))) (insert "=\"\"") - (forward-char -1))))))))) + (forward-char -1))) + :company-kind ,(lambda (_) 'enum-member))))))) (defconst rng-in-attribute-value-regex (replace-regexp-in-string @@ -279,7 +281,8 @@ Validation will be enabled if `rng-nxml-auto-validate-flag' is non-nil." (lambda (_completion status) (when (eq status 'finished) (let ((delim (char-before value-start))) - (unless (eq (char-after) delim) (insert delim))))))) + (unless (eq (char-after) delim) (insert delim)))))) + (kind-function (lambda (_) 'value))) (and (rng-adjust-state-for-attribute lt-pos name-start) (if (string= (buffer-substring-no-properties name-start @@ -290,14 +293,16 @@ Validation will be enabled if `rng-nxml-auto-validate-flag' is non-nil." (rng-possible-namespace-uris (and colon (buffer-substring-no-properties (1+ colon) name-end)))) - :exit-function ,exit-function) + :exit-function ,exit-function + :company-kind ,kind-function) (rng-adjust-state-for-attribute-value name-start colon name-end) `(,value-start ,(point) ,(rng-strings-to-completion-table (rng-match-possible-value-strings)) - :exit-function ,exit-function)))))) + :exit-function ,exit-function + :company-kind ,kind-function)))))) (defun rng-possible-namespace-uris (prefix) (let ((ns (if prefix (nxml-ns-get-prefix prefix) commit efea3a02f5f90566ba6e0c61371a68e21e2d1d77 Author: Dmitry Gutov Date: Sat May 15 03:44:16 2021 +0300 Add :company-kind support to sh-mode completion * lisp/progmodes/sh-script.el (sh--completion-keywords): New variable. (sh--cmd-completion-table): Extracted from here. (sh-completion-at-point-function): Add :company-kind. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index c6bd32a4a4..c3a12c5b2c 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1596,6 +1596,8 @@ This adds rules for comments and assignments." ;;; Completion +(defvar sh--completion-keywords '("if" "while" "until" "for")) + (defun sh--vars-before-point () (save-excursion (let ((vars ())) @@ -1617,7 +1619,7 @@ This adds rules for comments and assignments." (sh--vars-before-point)) (locate-file-completion-table exec-path exec-suffixes string pred t) - '("if" "while" "until" "for")))) + sh--completion-keywords))) (complete-with-action action cmds string pred))) (defun sh-completion-at-point-function () @@ -1628,9 +1630,17 @@ This adds rules for comments and assignments." (start (point))) (cond ((eq (char-before) ?$) - (list start end (sh--vars-before-point))) + (list start end (sh--vars-before-point) + :company-kind (lambda (_) 'variable))) ((sh-smie--keyword-p) - (list start end #'sh--cmd-completion-table)))))) + (list start end #'sh--cmd-completion-table + :company-kind + (lambda (s) + (cond + ((member s sh--completion-keywords) 'keyword) + ((string-suffix-p "=" s) 'variable) + (t 'function))) + )))))) ;;; Indentation and navigation with SMIE. commit c92ad6a75a20fe7e820268f2983523e7f69658ae Author: Dmitry Gutov Date: Sat May 15 03:17:17 2021 +0300 Include colons in the completion strings * lisp/textmodes/css-mode.el (css--complete-pseudo-element-or-class): Include colons in the completion strings. That's simply the nicer behavior (e.g. someone typing : will see pseudo-elements in completions as well), and by the standards, the colons are part of their names anyway (of pseudo-elements and classes). diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 879c24a2fe..61a2f6b3bc 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -1307,11 +1307,14 @@ for determining whether point is within a selector." (let ((pos (point))) (skip-chars-backward "-[:alnum:]") (when (eq (char-before) ?\:) - (list (point) pos - (if (eq (char-before (- (point) 1)) ?\:) - css-pseudo-element-ids - css-pseudo-class-ids) - :company-kind (lambda (_) 'function)))))) + (let ((double-colon (eq (char-before (- (point) 1)) ?\:))) + (list (- (point) (if double-colon 2 1)) + pos + (nconc + (unless double-colon + (mapcar (lambda (id) (concat ":" id)) css-pseudo-class-ids)) + (mapcar (lambda (id) (concat "::" id)) css-pseudo-element-ids)) + :company-kind (lambda (_) 'function))))))) (defun css--complete-at-rule () "Complete at-rule (statement beginning with `@') at point." commit 76ba00a1619d6bed27bc26578ffda6f4b43a4c6b Author: Dmitry Gutov Date: Sat May 15 02:47:05 2021 +0300 Add :company-kind support to css-mode completion * lisp/textmodes/css-mode.el (css--complete-pseudo-element-or-class) (css--complete-property-value, css-completion-at-point) (css--complete-at-rule): Add :company-kind properties, to annotate completions with kinds returned in each case. diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 47b0b517ae..879c24a2fe 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -1310,7 +1310,8 @@ for determining whether point is within a selector." (list (point) pos (if (eq (char-before (- (point) 1)) ?\:) css-pseudo-element-ids - css-pseudo-class-ids)))))) + css-pseudo-class-ids) + :company-kind (lambda (_) 'function)))))) (defun css--complete-at-rule () "Complete at-rule (statement beginning with `@') at point." @@ -1318,7 +1319,8 @@ for determining whether point is within a selector." (let ((pos (point))) (skip-chars-backward "-[:alnum:]") (when (eq (char-before) ?\@) - (list (point) pos css--at-ids))))) + (list (point) pos css--at-ids + :company-kind (lambda (_) 'keyword)))))) (defvar css--property-value-cache (make-hash-table :test 'equal :size (length css-property-alist)) @@ -1366,7 +1368,8 @@ the string PROPERTY." (skip-chars-backward "[:graph:]") (list (point) end (append '("inherit" "initial" "unset") - (css--property-values (car property))))))))) + (css--property-values (car property))) + :company-kind (lambda (_) 'value))))))) (defvar css--html-tags (mapcar #'car html-tag-alist) "List of HTML tags. @@ -1435,6 +1438,8 @@ tags, classes and IDs." (list prop-beg prop-end) (list sel-beg sel-end)) ,(completion-table-merge prop-table sel-table) + :company-kind + ,(lambda (s) (if (test-completion s prop-table) 'property 'keyword)) :exit-function ,(lambda (string status) (and (eq status 'finished) commit efc24f1e0bb127481bcc9c3054c57c4cd3c99aa9 Author: Lars Ingebrigtsen Date: Fri May 14 18:50:24 2021 +0200 Make the M-x obsoletion check more robust * lisp/simple.el (read-extended-command): Make the obsoletion check more robust. diff --git a/lisp/simple.el b/lisp/simple.el index 0255f69e42..fc3a4bd909 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2020,8 +2020,13 @@ This function uses the `read-extended-command-predicate' user option." ;; Has a current-name. (functionp (car obsolete)) ;; when >= emacs-major-version - (>= (car (version-to-list (caddr obsolete))) - emacs-major-version)))))) + (condition-case nil + (>= (car (version-to-list + (caddr obsolete))) + emacs-major-version) + ;; If the obsoletion version isn't + ;; valid, include the command. + (error t))))))) pred))) (complete-with-action action obarray string pred)))) (lambda (sym) commit 780b1db126fcfdbb50da5c1acf24b3c6e614dd9f Author: Alan Mackenzie Date: Fri May 14 15:52:21 2021 +0000 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. diff --git a/lisp/window.el b/lisp/window.el index db62d3308f..8928308eb2 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4361,45 +4361,45 @@ This may be a useful alternative binding for \\[delete-other-windows] ;; The following function is called by `set-window-buffer' _before_ it ;; replaces the buffer of the argument window with the new buffer. -(defun record-window-buffer (&optional window do-minibuf) - "Record WINDOW's buffer. +(defun push-window-buffer-onto-prev (&optional window) + "Push entry for WINDOW's buffer onto WINDOW's prev-buffers list. WINDOW must be a live window and defaults to the selected one. -If WINDOW is a minibuffer, it will only be recorded if DO-MINIBUF -is non-nil." +Any duplicate entries for the buffer in the list are removed." (let* ((window (window-normalize-window window t)) - (buffer (window-buffer window)) - (entry (assq buffer (window-prev-buffers window)))) + (buffer (window-buffer window)) + (w-list (window-prev-buffers window)) + (entry (assq buffer w-list))) + (when entry + (setq w-list (assq-delete-all buffer w-list))) + (let ((start (window-start window)) + (point (window-point window))) + (setq entry + (cons buffer + (with-current-buffer buffer + (if entry + ;; We have an entry, update marker positions. + (list (set-marker (nth 1 entry) start) + (set-marker (nth 2 entry) point)) + (list (copy-marker start) + (copy-marker + ;; Preserve window-point-insertion-type + ;; (Bug#12855) + point window-point-insertion-type)))))) + (set-window-prev-buffers window (cons entry w-list))))) + +(defun record-window-buffer (&optional window) + "Record WINDOW's buffer. +WINDOW must be a live window and defaults to the selected one." + (let* ((window (window-normalize-window window t)) + (buffer (window-buffer window))) ;; Reset WINDOW's next buffers. If needed, they are resurrected by ;; `switch-to-prev-buffer' and `switch-to-next-buffer'. (set-window-next-buffers window nil) ;; Don't record insignificant buffers. - (when (or (not (eq (aref (buffer-name buffer) 0) ?\s)) - (and do-minibuf (minibufferp buffer))) - (when entry - ;; Remove all entries for BUFFER from WINDOW's previous buffers. - (set-window-prev-buffers - window (assq-delete-all buffer (window-prev-buffers window)))) - ;; Add an entry for buffer to WINDOW's previous buffers. - (with-current-buffer buffer - (let ((start (window-start window)) - (point (window-point window))) - (setq entry - (cons buffer - (if entry - ;; We have an entry, update marker positions. - (list (set-marker (nth 1 entry) start) - (set-marker (nth 2 entry) point)) - ;; Make new markers. - (list (copy-marker start) - (copy-marker - ;; Preserve window-point-insertion-type - ;; (Bug#12855). - point window-point-insertion-type))))) - (set-window-prev-buffers - window (cons entry (window-prev-buffers window))))) - + (when (not (eq (aref (buffer-name buffer) 0) ?\s)) + (push-window-buffer-onto-prev window) (run-hooks 'buffer-list-update-hook)))) (defun unrecord-window-buffer (&optional window buffer) diff --git a/src/minibuf.c b/src/minibuf.c index 52d1275451..428998a639 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -157,16 +157,15 @@ zip_minibuffer_stacks (Lisp_Object dest_window, Lisp_Object source_window) Fset_window_start (dest_window, Fwindow_start (source_window), Qnil); Fset_window_point (dest_window, Fwindow_point (source_window)); dw->prev_buffers = sw->prev_buffers; - set_window_buffer (source_window, get_minibuffer (0), 0, 0); + set_window_buffer (source_window, nth_minibuffer (0), 0, 0); sw->prev_buffers = Qnil; return; } if (live_minibuffer_p (dw->contents)) - call2 (Qrecord_window_buffer, dest_window, Qt); + call1 (Qpush_window_buffer_onto_prev, dest_window); if (live_minibuffer_p (sw->contents)) - call2 (Qrecord_window_buffer, source_window, Qt); - + call1 (Qpush_window_buffer_onto_prev, source_window); acc = merge_c (dw->prev_buffers, sw->prev_buffers, minibuffer_ent_greater); if (!NILP (acc)) @@ -179,7 +178,7 @@ zip_minibuffer_stacks (Lisp_Object dest_window, Lisp_Object source_window) } dw->prev_buffers = acc; sw->prev_buffers = Qnil; - set_window_buffer (source_window, get_minibuffer (0), 0, 0); + set_window_buffer (source_window, nth_minibuffer (0), 0, 0); } /* If `minibuffer_follows_selected_frame' is t, or we're about to @@ -228,6 +227,8 @@ DEFUN ("active-minibuffer-window", Factive_minibuffer_window, return Qnil; innermost_MB = nth_minibuffer (minibuf_level); + if (NILP (innermost_MB)) + emacs_abort (); FOR_EACH_FRAME (frames, frame) { f = XFRAME (frame); @@ -653,6 +654,10 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, } minibuf_level++; /* Before calling choose_minibuf_frame. */ + /* Ensure now that the latest minibuffer has been created, in case + anything happens which depends on MINNIBUF_LEVEL and + Vminibuffer_list being consistent with eachother. */ + minibuffer = get_minibuffer (minibuf_level); /* Choose the minibuffer window and frame, and take action on them. */ @@ -680,7 +685,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, } MB_frame = XWINDOW (XFRAME (selected_frame)->minibuffer_window)->frame; if (live_minibuffer_p (XWINDOW (minibuf_window)->contents)) - call2 (Qrecord_window_buffer, minibuf_window, Qt); + call1 (Qpush_window_buffer_onto_prev, minibuf_window); record_unwind_protect_void (minibuffer_unwind); record_unwind_protect (restore_window_configuration, @@ -766,7 +771,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, /* Switch to the minibuffer. */ - minibuffer = get_minibuffer (minibuf_level); set_minibuffer_mode (minibuffer, minibuf_level); Fset_buffer (minibuffer); @@ -807,7 +811,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, /* Empty out the minibuffers of all frames, except those frames where there is an active minibuffer. Set them to point to ` *Minibuf-0*', which is always empty. */ - empty_minibuf = get_minibuffer (0); + empty_minibuf = nth_minibuffer (0); set_minibuffer_mode (empty_minibuf, 0); /* Display this minibuffer in the proper window. */ @@ -969,9 +973,7 @@ static Lisp_Object nth_minibuffer (EMACS_INT depth) { Lisp_Object tail = Fnthcdr (make_fixnum (depth), Vminibuffer_list); - if (NILP (tail)) - return Qnil; - return XCAR (tail); + return Fcar (tail); } /* Set the major mode of the minibuffer BUF, depending on DEPTH, the @@ -1076,9 +1078,13 @@ read_minibuf_unwind (void) Lisp_Object future_mini_window; Lisp_Object saved_selected_frame = selected_frame; Lisp_Object window, frames; + Lisp_Object expired_MB = nth_minibuffer (minibuf_level); struct window *w; struct frame *f; + if (NILP (expired_MB)) + emacs_abort (); + /* Locate the expired minibuffer. */ FOR_EACH_FRAME (frames, exp_MB_frame) { @@ -1088,7 +1094,7 @@ read_minibuf_unwind (void) { w = XWINDOW (window); if (EQ (w->frame, exp_MB_frame) - && EQ (w->contents, nth_minibuffer (minibuf_level))) + && EQ (w->contents, expired_MB)) goto found; } } @@ -1104,7 +1110,7 @@ read_minibuf_unwind (void) minibuffer when we reset the relevant variables. Don't depend on `minibuf_window' here. This could by now be the mini-window of any frame. */ - Fset_buffer (nth_minibuffer (minibuf_level)); + Fset_buffer (expired_MB); minibuf_level--; /* Restore prompt, etc, from outer minibuffer level. */ @@ -2272,6 +2278,8 @@ init_minibuf_once (void) staticpro (&Vminibuffer_list); staticpro (&Vcommand_loop_level_list); pdumper_do_now_and_after_load (init_minibuf_once_for_pdumper); + /* Ensure our inactive minibuffer exists. */ + get_minibuffer (0); } static void @@ -2337,6 +2345,7 @@ syms_of_minibuf (void) DEFSYM (Qminibuffer_completing_file_name, "minibuffer-completing-file-name"); DEFSYM (Qselect_frame_set_input_focus, "select-frame-set-input-focus"); DEFSYM (Qadd_to_history, "add-to-history"); + DEFSYM (Qpush_window_buffer_onto_prev, "push-window-buffer-onto-prev"); DEFVAR_LISP ("read-expression-history", Vread_expression_history, doc: /* A history list for arguments that are Lisp expressions to evaluate. diff --git a/src/window.c b/src/window.c index 0a14eca58f..9961c54161 100644 --- a/src/window.c +++ b/src/window.c @@ -7264,8 +7264,8 @@ restore_window_configuration (Lisp_Object configuration) { if (CONSP (configuration)) Fset_window_configuration (XCAR (configuration), - XCAR (XCDR (configuration)), - XCAR (XCDR (XCDR (configuration)))); + Fcar_safe (XCDR (configuration)), + Fcar_safe (Fcdr_safe (XCDR (configuration)))); else Fset_window_configuration (configuration, Qnil, Qnil); }