diff options
| author | Gerd Moellmann | 2000-01-13 14:46:19 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-01-13 14:46:19 +0000 |
| commit | 8f2a992b1a1c560759242a384d8b4ce0ec6aacdd (patch) | |
| tree | ea8fc722c5b528a664c454eee007ac996e8c9a96 | |
| parent | feb450e0c4c476d41323d9bea7293565a8efce1e (diff) | |
| download | emacs-8f2a992b1a1c560759242a384d8b4ce0ec6aacdd.tar.gz emacs-8f2a992b1a1c560759242a384d8b4ce0ec6aacdd.zip | |
(frame-notice-user-settings): New variable.
(frame-notice-user-settings): Don't modify frame parameters
if called a second time.
(frame-notice-user-settings):
Notice default-frame-parameters even for non-window frames.
| -rw-r--r-- | lisp/frame.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index 8970fe25ece..c65b632a236 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -211,6 +211,9 @@ Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args." | |||
| 211 | (error | 211 | (error |
| 212 | "Can't create multiple frames without a window system")))))))) | 212 | "Can't create multiple frames without a window system")))))))) |
| 213 | 213 | ||
| 214 | (defvar frame-notice-user-settings t | ||
| 215 | "Non-nil means function `frame-notice-user-settings' wasn't run yet.") | ||
| 216 | |||
| 214 | ;;; startup.el calls this function after loading the user's init | 217 | ;;; startup.el calls this function after loading the user's init |
| 215 | ;;; file. Now default-frame-alist and initial-frame-alist contain | 218 | ;;; file. Now default-frame-alist and initial-frame-alist contain |
| 216 | ;;; information to which we must react; do what needs to be done. | 219 | ;;; information to which we must react; do what needs to be done. |
| @@ -233,6 +236,20 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." | |||
| 233 | ;; window is the minibuffer. | 236 | ;; window is the minibuffer. |
| 234 | (let ((old-buffer (current-buffer))) | 237 | (let ((old-buffer (current-buffer))) |
| 235 | 238 | ||
| 239 | (when (and frame-notice-user-settings | ||
| 240 | (null frame-initial-frame)) | ||
| 241 | ;; This case happens when we don't have a window system. | ||
| 242 | (let ((parms (frame-parameters frame-initial-frame))) | ||
| 243 | ;; Don't change the frame names. | ||
| 244 | (setq parms (delq (assq 'name parms) parms)) | ||
| 245 | ;; Can't modify the minibuffer parameter, so don't try. | ||
| 246 | (setq parms (delq (assq 'minibuffer parms) parms)) | ||
| 247 | (modify-frame-parameters nil | ||
| 248 | (append initial-frame-alist | ||
| 249 | default-frame-alist | ||
| 250 | parms | ||
| 251 | nil)))) | ||
| 252 | |||
| 236 | ;; If the initial frame is still around, apply initial-frame-alist | 253 | ;; If the initial frame is still around, apply initial-frame-alist |
| 237 | ;; and default-frame-alist to it. | 254 | ;; and default-frame-alist to it. |
| 238 | (if (frame-live-p frame-initial-frame) | 255 | (if (frame-live-p frame-initial-frame) |
| @@ -387,6 +404,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." | |||
| 387 | 404 | ||
| 388 | ;; Make sure the initial frame can be GC'd if it is ever deleted. | 405 | ;; Make sure the initial frame can be GC'd if it is ever deleted. |
| 389 | ;; Make sure frame-notice-user-settings does nothing if called twice. | 406 | ;; Make sure frame-notice-user-settings does nothing if called twice. |
| 407 | (setq frame-notice-user-settings nil) | ||
| 390 | (setq frame-initial-frame nil))) | 408 | (setq frame-initial-frame nil))) |
| 391 | 409 | ||
| 392 | (defun make-initial-minibuffer-frame (display) | 410 | (defun make-initial-minibuffer-frame (display) |