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

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

frame-local variables / parameters not set by make-frame


From: David Reitter
Subject: frame-local variables / parameters not set by make-frame
Date: Fri, 13 Jan 2006 22:25:00 +0000

`make-frame' takes an argument with a list of parameters to create the frame with. However, non-standard frame parameters don't seem to be set, even when declared with `make-variable-frame-local'. That's a bit odd. I would expect `make-frame' to set all parameters, whether they are standard or self-defined, and whether they act as frame-local variables or not.

`modify-frame-parameters', does it like that and provides useful functionality.


To give an example when this is needed: I store an extra frame parameter called `fit-frame', which is evaluated by my own `frame- creation-function', automatically fitting the frame using Drew Adams' frame fitting package. This way I can steer the frame fitting to apply only to certain frames.



Example:

(make-variable-frame-local 'dr)

(make-frame '((dr . t ) (height . 20) (width . 30)))

(frame-parameter nil 'dr) ;; --> ought to be t, but is nil

(modify-frame-parameters nil '((dr2 . t ) (dr . t)))

(frame-parameter nil 'dr) ;; is t as expected
(frame-parameter nil 'dr2) ;; is t, too - even if it wasn't made local




reply via email to

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