(when (and frame-notice-user-settings
(null frame-initial-frame))
- ;; This case happens when we don't have a window system.
+ ;; This case happens when we don't have a window system, and
+ ;; also for MS-DOS frames.
(let ((parms (frame-parameters frame-initial-frame)))
;; Don't change the frame names.
(setq parms (delq (assq 'name parms) parms))
;; Can't modify the minibuffer parameter, so don't try.
(setq parms (delq (assq 'minibuffer parms) parms))
(modify-frame-parameters nil
- (append initial-frame-alist
- default-frame-alist
- parms
- nil))))
+ (if (null window-system)
+ (append initial-frame-alist
+ default-frame-alist
+ parms
+ nil)
+ ;; initial-frame-alist and
+ ;; default-frame-alist were already
+ ;; applied in pc-win.el.
+ parms))
+ (if (null window-system) ;; MS-DOS does this differently in pc-win.el
+ (let ((newparms (frame-parameters))
+ (frame (selected-frame)))
+ (tty-handle-reverse-video frame newparms)
+ ;; If we changed the background color, we need to update
+ ;; the background-mode parameter, and maybe some faces,
+ ;; too.
+ (when (assq 'background-color newparms)
+ (unless (or (assq 'background-mode initial-frame-alist)
+ (assq 'background-mode default-frame-alist))
+ (frame-set-background-mode frame))
+ (face-set-after-frame-default frame))))))
;; If the initial frame is still around, apply initial-frame-alist
;; and default-frame-alist to it.
"Functions to run after a frame is created.
The functions are run with one arg, the newly created frame.")
-(defvar after-setting-font-hooks nil
+(defvar after-setting-font-hook nil
"Functions to run after a frame's font has been changed.")
;; Alias, kept temporarily.
(x-list-fonts "*" nil (selected-frame)))))))
(modify-frame-parameters (selected-frame)
(list (cons 'font font-name)))
- (run-hooks 'after-setting-font-hooks))
+ (run-hooks 'after-setting-font-hook 'after-setting-font-hooks))
(defun set-background-color (color-name)
"Set the background color of the selected frame to COLOR-NAME.
\f
(defcustom show-cursor-in-non-selected-windows t
"*Non-nil means show a hollow box cursor in non-selected-windows.
-If nil, don't show a cursor except in the selected window."
+If nil, don't show a cursor except in the selected window.
+Setting this variable directly has no effect; use custom instead."
:tag "Cursor in non-selected windows"
:type 'boolean
:group 'cursor
(provide 'frame)
;;; frame.el ends here
-(frame-notice-user-settings):