comparison lisp/frame.el @ 31899:ce212cd0463f

(frame-notice-user-settings): Make tool-bar-mode and default-frame-alist consistent.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 26 Sep 2000 11:52:01 +0000
parents 716c4876654b
children b54fba72959b
comparison
equal deleted inserted replaced
31898:a73424672d42 31899:ce212cd0463f
219 ;;; 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.
220 (defun frame-notice-user-settings () 220 (defun frame-notice-user-settings ()
221 "Act on user's init file settings of frame parameters. 221 "Act on user's init file settings of frame parameters.
222 React to settings of `default-frame-alist', `initial-frame-alist' there." 222 React to settings of `default-frame-alist', `initial-frame-alist' there."
223 ;; Make menu-bar-mode and default-frame-alist consistent. 223 ;; Make menu-bar-mode and default-frame-alist consistent.
224 (if (boundp 'menu-bar-mode) 224 (when (boundp 'menu-bar-mode)
225 (let ((default (assq 'menu-bar-lines default-frame-alist))) 225 (let ((default (assq 'menu-bar-lines default-frame-alist)))
226 (if default 226 (if default
227 (setq menu-bar-mode (not (eq (cdr default) 0))) 227 (setq menu-bar-mode (not (eq (cdr default) 0)))
228 (setq default-frame-alist 228 (setq default-frame-alist
229 (cons (cons 'menu-bar-lines (if menu-bar-mode 1 0)) 229 (cons (cons 'menu-bar-lines (if menu-bar-mode 1 0))
230 default-frame-alist))))) 230 default-frame-alist)))))
231
232 ;; Make tool-bar-mode and default-frame-alist consistent.
233 (when (boundp 'tool-bar-mode)
234 (let ((default (assq 'tool-bar-lines default-frame-alist)))
235 (if default
236 (setq tool-bar-mode (not (eq (cdr default) 0)))
237 (setq default-frame-alist
238 (cons (cons 'tool-bar-lines (if tool-bar-mode 1 0))
239 default-frame-alist)))))
231 240
232 ;; Creating and deleting frames may shift the selected frame around, 241 ;; Creating and deleting frames may shift the selected frame around,
233 ;; and thus the current buffer. Protect against that. We don't 242 ;; and thus the current buffer. Protect against that. We don't
234 ;; want to use save-excursion here, because that may also try to set 243 ;; want to use save-excursion here, because that may also try to set
235 ;; the buffer of the selected window, which fails when the selected 244 ;; the buffer of the selected window, which fails when the selected