summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/cus-start.el8
-rw-r--r--lisp/window.el8
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 44ce2929d66..baa05d0a89a 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -314,7 +314,13 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(other :tag "hidden by keypress" 1))
"22.1")
(make-pointer-invisible mouse boolean "23.2")
- (menu-bar-mode frames boolean nil
+ (resize-mini-frames
+ frames (choice
+ (const :tag "Never" nil)
+ (const :tag "Fit frame to buffer" t)
+ (function :tag "User-defined function"))
+ "27.1")
+ (menu-bar-mode frames boolean nil
;; FIXME?
;; :initialize custom-initialize-default
:set custom-set-minor-mode)
diff --git a/lisp/window.el b/lisp/window.el
index a8b65657a49..b769be06337 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2753,7 +2753,7 @@ as small) as possible, but don't signal an error."
;; Sanitize DELTA.
(cond
((<= (+ height delta) 0)
- (setq delta (- (frame-char-height (window-frame window)) height)))
+ (setq delta (- (frame-char-height frame) height)))
((> delta min-delta)
(setq delta min-delta)))
@@ -3381,6 +3381,12 @@ routines."
pixel-delta
(/ pixel-delta (frame-char-height frame)))))
+(defun window--resize-mini-frame (frame)
+ "Resize minibuffer-only frame FRAME."
+ (if (functionp resize-mini-frames)
+ (funcall resize-mini-frames frame)
+ (fit-frame-to-buffer frame)))
+
(defun window--sanitize-window-sizes (horizontal)
"Assert that all windows on selected frame are large enough.
If necessary and possible, make sure that every window on frame