bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44080: 27.1; Display behavior of overlays `after-string` in resizabl


From: martin rudalics
Subject: bug#44080: 27.1; Display behavior of overlays `after-string` in resizable minibuffer frames
Date: Thu, 22 Oct 2020 18:26:51 +0200

> I never dealt with the C side of Emacs and you suggested to offer the
> new function as first customization choice for `resize-mini-frames`.
> I guess this needs to be done on the C side as the variable is defined
> there?

The customization is done here in cus-start.el

             (resize-mini-frames
              frames (choice
                      (const :tag "Never" nil)
                      (const :tag "Fit frame to buffer" t)
                      (function :tag "User-defined function"))
               "27.1")

and the only things to change are to put a "mini" between "Fit" and
"frame" and update the tag to hmmm ... I meanwhile think we should put
that change into Emacs 27.2 provided Eli doesn't object.

And the only C-side change is to change the doc-string of
'resize-mini-frames' (in frame.c) where we say

Any other non-nil value means to resize minibuffer-only frames by
calling `fit-frame-to-buffer'.  */);

to

Any other non-nil value means to resize minibuffer-only frames by
calling `fit-mini-frame-to-buffer'.  */);

> I have attached the patch I have worked on. Let me know how to proceed
> and thanks for your help!

The patch looks fine to me.  I'd change the following:

(1) Make the FRAME argument of 'fit-mini-frame-to-buffer' optional so we
    retain a certain consistency wrt 'fit-frame-to-buffer'.

(2) The "Any leading or trailing empty lines of the buffers content are
    not considered." should be moved towards the end of its doc-string
    or at least after the "FRAME can be any live frame and defaults to
    the selected one."

(3) The doc-string of 'fit-frame-to-buffer-1' should be amended with
    something like

    "The remaining arguments are as for `fit-frame-to-buffer'.

In the Elisp manual in the description of 'resize-mini-frames' we should
replace the

Any other non-@code{nil} value means to resize minibuffer-only frames
by calling @code{fit-frame-to-buffer} (@pxref{Resizing Windows}).

with something like

Any other non-@code{nil} value means to resize minibuffer-only frames by
calling @code{fit-mini-frame-to-buffer}, a function that behaves like
@code{fit-frame-to-buffer} (@pxref{Resizing Windows}) but does not strip
leading or trailing empty lines from the buffer text.

In addition we need to call out the change in NEWS and write a
ChangeLog entry.

Many thanks, martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]