From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
Lars Ingebrigtsen <larsi@gnus.org>
Cc: 24651@debbugs.gnu.org, Colin Fraizer <colin.fraizer@gmail.com>
Subject: bug#24651: 25.1; frame-inherited-parameters only partially works
Date: Thu, 3 Dec 2020 10:53:48 +0100 [thread overview]
Message-ID: <870b9337-6335-1dd3-4a42-56041c7a178e@gmx.at> (raw)
In-Reply-To: <jwv5z5knnzf.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 504 bytes --]
> Clearly, a `sit-for` is undesirable, so if we can avoid it we should.
> Setting the params before creating the frame also has the advantage of
> avoiding a visible resize.
And no 100% untested patch? The attached should do it but I think has
the some conceptual flaw as the old behavior: When a val is nil, it
won't override a default parameter whose value is non-nil. But I never
figured out what inherited parameters are useful for in the first place
so maybe this is of no importance.
martin
[-- Attachment #2: frame-inherited-parameters.diff --]
[-- Type: text/x-patch, Size: 1478 bytes --]
diff --git a/lisp/frame.el b/lisp/frame.el
index 772ba3d8c4..948c782328 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -864,7 +864,6 @@ make-frame
(error "Don't know how to interpret display %S"
display)))
(t window-system)))
- (oldframe (selected-frame))
(params parameters)
frame child-frame)
@@ -882,8 +881,12 @@ make-frame
(dolist (p default-frame-alist)
(unless (assq (car p) params)
(push p params)))
-
-;; (setq frame-size-history '(1000))
+ ;; Add parameters from `frame-inherited-parameters' unless they are
+ ;; overridden by explicit parameters.
+ (dolist (param frame-inherited-parameters)
+ (unless (assq param parameters)
+ (let ((val (frame-parameter nil param)))
+ (when val (push (cons param val) params)))))
(when (eq (cdr (or (assq 'minibuffer params) '(minibuffer . t)))
'child-frame)
@@ -916,12 +919,6 @@ make-frame
frame 'minibuffer (frame-root-window child-frame))))
(normal-erase-is-backspace-setup-frame frame)
- ;; Inherit original frame's parameters unless they are overridden
- ;; by explicit parameters.
- (dolist (param frame-inherited-parameters)
- (unless (assq param parameters)
- (let ((val (frame-parameter oldframe param)))
- (when val (set-frame-parameter frame param val)))))
(when (numberp (car frame-size-history))
(setq frame-size-history
next prev parent reply other threads:[~2020-12-03 9:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-08 19:29 bug#24651: 25.1; frame-inherited-parameters only partially works Colin Fraizer
2020-11-30 12:05 ` Lars Ingebrigtsen
2020-11-30 17:30 ` martin rudalics
2020-12-02 9:57 ` Lars Ingebrigtsen
2020-12-02 10:31 ` martin rudalics
2020-12-02 17:00 ` Stefan Monnier
2020-12-03 9:53 ` martin rudalics [this message]
2020-12-03 10:28 ` Lars Ingebrigtsen
2020-12-03 15:26 ` Stefan Monnier
2020-12-03 15:45 ` martin rudalics
2022-02-08 6:38 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=870b9337-6335-1dd3-4a42-56041c7a178e@gmx.at \
--to=rudalics@gmx.at \
--cc=24651@debbugs.gnu.org \
--cc=colin.fraizer@gmail.com \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.