]> git.eshelyaron.com Git - emacs.git/commitdiff
Use window parameters for *Completions* UI
authorEshel Yaron <me@eshelyaron.com>
Sun, 12 May 2024 15:46:19 +0000 (17:46 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 12 May 2024 15:46:19 +0000 (17:46 +0200)
lisp/minibuffer.el

index ddda14376c400be2610199e28fd47293da742f98..f7b802a7d53f2b24089158c0d6275c254dbe50a6 100644 (file)
@@ -3169,9 +3169,7 @@ completions list."
   (completion-list-mode)
   (when completion-tab-width (setq tab-width completion-tab-width))
   (when completions-highlight-face (cursor-face-highlight-mode 1))
-  (face-remap-add-relative 'header-line 'completions-heading)
-  (setq-local header-line-format completions-header-format)
-  (setq-local mode-line-format nil))
+  (face-remap-add-relative 'header-line 'completions-heading))
 
 (defun completions-display (completions &rest plist)
   "Display COMPLETIONS in the buffer specified by `standard-output'.
@@ -3238,10 +3236,14 @@ PLIST is a property list with optional extra information about COMPLETIONS."
        completions-action (plist-get plist :action)))
     (run-hooks 'completion-setup-hook)
     (display-buffer buf
-                    '((display-buffer-reuse-window display-buffer-at-bottom)
+                    `((display-buffer-reuse-window display-buffer-at-bottom)
                       (window-height . completions--fit-window-to-buffer)
                       (preserve-size . (nil . t))
-                      (dedicated . soft)))))
+                      (dedicated     . soft)
+                      (window-parameters
+                       (mode-line-format   . none)
+                       (header-line-format . ,completions-header-format)
+                       (split-window       . ignore))))))
 
 (defun display-completion-list (completions &optional group-fun)
   "Display the list of completions, COMPLETIONS, using `standard-output'.