diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2021-07-10 04:07:56 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2021-07-10 04:07:56 +0200 |
| commit | 33b37fdf364d5df4ee712a91cff7f1f01526674a (patch) | |
| tree | 6d2c055886e7e5116ec331b3ebed4b7bdeb96b9f | |
| parent | 6cfa4e982758030e9793c8376dd577870bc24b81 (diff) | |
Introduce corfu--buffer-parameters
| -rw-r--r-- | corfu.el | 35 |
1 files changed, 20 insertions, 15 deletions
@@ -225,6 +225,23 @@ filter string with spaces is allowed." (desktop-dont-save . t)) "Default child frame parameters.") +(defvar corfu--buffer-parameters + '((mode-line-format . nil) + (header-line-format . nil) + (tab-line-format . nil) + (frame-title-format . "") + (truncate-lines . t) + (cursor-in-non-selected-windows . nil) + (cursor-type . nil) + (show-trailing-whitespace . nil) + (display-line-numbers . nil) + (left-fringe-width . nil) + (right-fringe-width . nil) + (left-margin-width . 0) + (right-margin-width . 0) + (fringes-outside-margins . 0)) + "Default child frame buffer parameters.") + ;; Function adapted from posframe.el by tumashu (defun corfu--make-frame (x y width height content) "Show child frame at X/Y with WIDTH/HEIGHT and CONTENT." @@ -255,21 +272,9 @@ filter string with spaces is allowed." yb)) (buffer (get-buffer-create " *corfu*"))) (with-current-buffer buffer - (setq-local mode-line-format nil - header-line-format nil - tab-line-format nil - frame-title-format "" - truncate-lines t - cursor-type nil - cursor-in-non-selected-windows nil - show-trailing-whitespace nil - display-line-numbers nil - left-fringe-width nil - right-fringe-width nil - left-margin-width nil - right-margin-width nil - fringes-outside-margins 0 - face-remapping-alist fr) + (dolist (var corfu--buffer-parameters) + (set (make-local-variable (car var)) (cdr var))) + (setq-local face-remapping-alist fr) (let ((inhibit-modification-hooks t)) (erase-buffer) (insert content) |
